|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-12-27 20:03 UTC] jon@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Jun 17 12:00:02 2026 UTC |
Right now, it's impossible to generate valid XHTML by using the nl2br() command, as it outputs a <br> tag. It would be nice to change this to output a <br /> tag instead, which is fully backward compatible afaik, and also valid XML (and hence XHTML). Here's an extremely complicated patch that should hopefully accomplish this :-) --- ext/standard/string.c.orig Sat Dec 23 23:39:06 2000 +++ ext/standard/string.c Sat Dec 23 23:40:48 2000 @@ -2304,7 +2304,7 @@ PHP_FUNCTION(nl2br) convert_to_string_ex(str); - php_char_to_str((*str)->value.str.val,(*str)->value.str.len,'\n',"<br>\n",5,return_value); + php_char_to_str((*str)->value.str.val,(*str)->value.str.len,'\n',"<br />\n",7,return_value); } /* }}} */