#44276 [NEW]: nl2br function doesn't work as described
| From: | lokitek at gmail dot com | Date: | Thu, 28 Feb 2008 00:10:42 +0000 |
| Subject: | #44276 [NEW]: nl2br function doesn't work as described | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-549@lists.php.net to get a copy of this message | ||
From: lokitek at gmail dot com
Operating system: el5
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: nl2br function doesn't work as described
Description:
------------
Using the example supplied of:
echo nl2br("foo isn't\n bar");
My php 5.1.6 is actually echoing out:
foo isn't<br> bar
This is NOT xhtml compliant since it's suppose to be <br />
Anyone experienced this?
extra info:
PHP 5.1.6 (cli)
Reproduce code:
---------------
echo nl2br("foo isn't\n bar");
Expected result:
----------------
foo isn't<br /> bar
Actual result:
--------------
foo isn't<br> bar
--
Edit bug report at http://bugs.php.net/?id=44276&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44276&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44276&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44276&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44276&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44276&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44276&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44276&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44276&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44276&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44276&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44276&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44276&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44276&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44276&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44276&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44276&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44276&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44276&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44276&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44276&r=mysqlcfg