#11347 [Com]: nl2br works not correctly

From: Date: Tue, 20 Jul 2004 15:05:53 +0000
Subject: #11347 [Com]: nl2br works not correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-62957@lists.php.net to get a copy of this message
ID: 11347 Comment by: animal-animated1436 at hotmail dot com Reported By: bate at bate dot de Status: Bogus Bug Type: Strings related Operating System: Linux/FreeBSD PHP Version: 4.0.5 New Comment: <a href=http://japan-nailsavinews.da.ru>animated animal</a> Previous Comments: ------------------------------------------------------------------------ [2001-06-08 14:09:20] sniper@php.net This is not bug. nl2br() is now xHTML compliant. ------------------------------------------------------------------------ [2001-06-08 02:48:19] bate at bate dot de I checked the Source and found the Problem: ./ext/standart/ -> string.c Line 2512: php_char_to_str((*str)->value.str.val,(*str)->value.str.len,'\n',"<br />\n",7,return_value); Correct this please to Line 2512: php_char_to_str((*str)->value.str.val,(*str)->value.str.len,'\n',"<br>\n",7,return_value); ------------------------------------------------------------------------ [2001-06-08 02:05:24] bate at bate dot de The function nl2br works not correct: $string="Testline1\nTestline2"; echo nl2br($string); output: Testlin1 <br /> Testlin2 the <br> are wrong. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=11347&edit=1

« previous php.bugs (#62957) next »