php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11611 nl2br() outputting invalid <br> tags
Submitted: 2001-06-21 22:13 UTC Modified: 2004-10-13 22:40 UTC
From: nutbar at chemlab dot org Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.0.5 OS: Linux Slackware current 2.4.5
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nutbar at chemlab dot org
New email:
PHP Version: OS:

 

 [2001-06-21 22:13 UTC] nutbar at chemlab dot org
put this into a test php file:

<?php
	$temp = "this is\n\na test\n";
	printf("%s", nl2br($temp));
?>

and you should get this as output from your webserver:

this is<br />
<br />
a test<br />

I have confirmed this to be also an issue in the 4.0.6 release candidates, but I do not know when this all of a sudden became an issue.  I'd like to know why it's creating <br /> tags instead of <br> tags :)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-22 04:39 UTC] derick@php.net
It's XHTML compliant
 [2001-06-22 09:07 UTC] sniper@php.net
Could this be even more bogus? :)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC