nl2br() should have an option for XHTML/HTML compatible BR element
| Request #34381 | nl2br() should have an option for XHTML/HTML compatible BR element | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2005-09-05 22:56 UTC | Modified: | 2008-08-14 02:56 UTC |
|
||||||||||
| From: | jasper at bryant-greene dot name | Assigned: | kalle (profile) | |||||||||||
| Status: | Closed | Package: | Feature/Change Request | |||||||||||
| PHP Version: | 5.0.4 | OS: | N/A | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2005-09-05 22:56 UTC] jasper at bryant-greene dot name
Description: ------------ The nl2br() function, as of PHP 4.0.5, always inserts <br />. However, in HTML a complaint parser should understand this as <br>> (it is the SGML SHORTTAG syntax). For example, this code: | <p>This is<br />a paragraph</p> should be rendered as this in an HTML document[1]: | This is | >a paragraph Therefore, in order to maintain compatibility with both HTML and XHTML specifications, I request that an option be added to nl2br() that allows XHTML or HTML compliant br elements to be inserted. [1] for more information, see http://hixie.ch/advocacy/xhtml
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2007-10-25 17:25 UTC] nospam at wanted dot by dot me
[2008-03-13 15:28 UTC] holliwell at gmx dot net
[2008-08-14 02:56 UTC] kalle@php.net