#34381 [NEW]: nl2br() should have an option for XHTML/HTML compatible BR element
| From: | jasper at bryant-greene dot name | Date: | Mon, 05 Sep 2005 20:56:35 +0000 |
| Subject: | #34381 [NEW]: nl2br() should have an option for XHTML/HTML compatible BR element | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-84555@lists.php.net to get a copy of this message | ||
From: jasper at bryant-greene dot name
Operating system: N/A
PHP version: 5.0.4
PHP Bug Type: Feature/Change Request
Bug description: nl2br() should have an option for XHTML/HTML compatible BR element
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
--
Edit bug report at http://bugs.php.net/?id=34381&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34381&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34381&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34381&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34381&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34381&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34381&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34381&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34381&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34381&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34381&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34381&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34381&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34381&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34381&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34381&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34381&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34381&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34381&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34381&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34381&r=mysqlcfg