On Mon, 2003-11-10 at 20:21, Eugene Lee wrote:
> On Mon, Nov 10, 2003 at 04:05:07PM -0800, Chris Shiflett wrote:
> : 
> : --- Eugene Lee <[EMAIL PROTECTED]> wrote:
> : >
> : > Warning: nl2br() is not safe because it emits "<br />" tags which do
> : > not always work on all browsers (especially browsers not explicitly
> : > advertised to be XHTML-compliant).
> : 
> : Can you name a single browser that cannot properly render a <br /> tag?
> 
> There were rendering problems discovered with one popular web forum
> software called vBulletin.

So just change it....

$string = nl2br($content->page_content);
$string = eregi_replace("<br />", "<br>", $string);


In light of this perhaps something like:

nl2br(string, int)

would be a nice addition where int is 1 or 2 for xhtml or html tags.
Although it's odd that this would break anything as it's purpose is
backward compatibility.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to