#44795 [NEW]: nl2br should have option for generating HTML instead of XHTML
| From: | mmiikkee13 at gmail dot com | Date: | Tue, 22 Apr 2008 01:09:29 +0000 |
| Subject: | #44795 [NEW]: nl2br should have option for generating HTML instead of XHTML | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-124415@lists.php.net to get a copy of this message | ||
From: mmiikkee13 at gmail dot com
Operating system: Linux
PHP version: 5.2.5
PHP Bug Type: Feature/Change Request
Bug description: nl2br should have option for generating HTML instead of XHTML
Description:
------------
nl2br should include an optional argument to make it generate HTML instead
of XHTML. Not every site uses XHTML, and PHP doesn't usually seem like an
XHTML-specific language to me - heck, it can even echo out C code if you
were that crazy. (No offense to anyone who's actually tried that.)
XHTML could still be the default, but the function should be changed to
something like nl2br($text, $xhtml=FALSE).
While <br /> may only generate a warning in the W3C validator, it
recommends only using it in XHTML documents, not HTML. Besides that, people
view pages with browsers, not hyperactive validators.
--
Edit bug report at http://bugs.php.net/?id=44795&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44795&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44795&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44795&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44795&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44795&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44795&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44795&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44795&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44795&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44795&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44795&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44795&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44795&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44795&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44795&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44795&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44795&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44795&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44795&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44795&r=mysqlcfg