|
Posted by Geoff Berrow on 12/17/20 11:54
Message-ID: <earbtp$66m$2@blue.rahul.net> from axlq contained the
following:
>That converts line breaks to <br /> which doesn't validate as
>HTML unless you do str_replace("<br />", "<br>", nl2br($text));
>And doing that seems inefficient since nl2br() already performs
>str_replace("\n", "<br />", $text). You may as well do the
>str_replace yourself and ignore nl2br().
Except that it's not always \n
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Navigation:
[Reply to this message]
|