Re: php3-php4 mysql problem with nl2br coding
| From: | Raquel Rice | Date: | Fri, 23 Nov 2001 23:27:42 +0000 |
| Subject: | Re: php3-php4 mysql problem with nl2br coding | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14563@lists.php.net to get a copy of this message | ||
On Fri, 23 Nov 2001 14:04:00 -0600
Terry Romine Terry Romine <eatrom@blazing-trails.com> wrote:
> 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.
>
I believe that is not a "bug", but instead is the HTML 4.01 and
XHTML 1.0 spec which says that all tags, including empty elements,
must be closed.
Perhaps you might change your "ereg_replace()" to look for
either/both types of tags?
--
Raquel
============================================================
Little progress can be made by merely attempting to repress what is
evil; our great hope lies in developing what is good.
--Calvin Coolidge