Bug #10707 Updated: nl2br gives <br /\n>

From: Date: Mon, 07 May 2001 16:29:14 +0000
Subject: Bug #10707 Updated: nl2br gives <br /\n>
Groups: php.dev 
Request: Send a blank email to php-dev+get-54244@lists.php.net to get a copy of this message
ID: 10707 Updated by: cardinal Reported By: al@humantouch.de Old-Status: Open Status: Closed Bug Type: Strings related Operating system: PHP Version: 4.0.5 Assigned To: Comments: What it's actually outputting is "<br />\n" <? $str = "One\nTwo"; echo nl2br($str); ?> Yields One<br /> Two This is consistent with its old behavior, which was to output "<br>\n" While it might not strictly be the expected behavior, this seems fine to me. The newline won't affect how a browser renders the string, since it's just whitespace to be ignored. Previous Comments: --------------------------------------------------------------------------- [2001-05-07 11:27:04] al@humantouch.de It seems that nl2br() returns <br/n> --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10707&edit=2

« previous php.dev (#54244) next »