Re: php3-php4 mysql problem with nl2br coding

From: Date: Fri, 23 Nov 2001 20:19:23 +0000
Subject: Re: php3-php4 mysql problem with nl2br coding
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-14560@lists.php.net to get a copy of this message
Hello, > I seem to have run into a strange bug where when I enter text through a > form, and use the nl2br call in PHP, instead of getting "<BR>" I get > "<BR />" and then my parsing fails on the display side (where I use > ereg_replace("<br>","", $string) to clean up the breaks. "<br />" is not a bug but the way this tag should be written under the XML specs: > Also, empty elements (those represented in HTML as <img>, <link>, <hr>, > <br> > and so on) must use the special XML empty-element tag form, with a slash (/) > before the closing >. The <br> tag becomes <br/>, <hr> becomes > <hr/>, and so > on. (from <http://www.xml.com/pub/a/2000/12/13/xmlhtml.html>) Regards, Tomás +-- --+ Tomás García Ferrari Bigital http://bigital.com/ +-- --+

« previous php.db (#14560) next »