RE: [PHP] strip_tags bug ?
| From: | David Freeman | Date: | Fri, 07 Jun 2002 22:44:31 +0000 |
| Subject: | RE: [PHP] strip_tags bug ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-101213@lists.php.net to get a copy of this message | ||
> The minor problem is that it treats a "not-equals" sign,
> "<>", as an empty tag and strips it, unless it's explicitely
...etc...
Except, of course, that when writing html you are supposed to use
entities for any valid html stuff - ie. Use > and $lt; for > < and so
on. As you should also use " if you want a " in your html. The
fact that various browsers will let you get away with this does not make
it valid html.
The argument above it a little like saying that there's a bug in php
because it will get confused if you have " marks inside your " marks...
Eg.
$string = "fred said "wow" to me";
By your argument this should work because php should figure out what you
mean with multiple instances of ". You have a way of making it work
that is well documented. Ditto for html.
Of course, this doesn't stop inummerable people who, I presume, don't
know any better, from using < > " and other stuff instead of their
equivalent html entities.
CYA, Dave