RE: [PHP] htmlspecialchars()
| From: | Chris W. Parker | Date: | Thu, 25 Mar 2004 20:59:54 +0000 |
| Subject: | RE: [PHP] htmlspecialchars() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-181509@lists.php.net to get a copy of this message | ||
Anthony Ritter <mailto:tony@gonefishingguideservice.com>
on Thursday, March 25, 2004 12:41 PM said:
ok first of all your email was pretty confusing.... until i read the
entire thing! not that it's long, but that you sign off before you're
even done with it.
but i digress...
> $new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
> echo $new;
>
> // this is what is output:<a href='test'>Test</a>
> // instead of this...
> // <a href='test'>Test</a>
when you say "output" do you mean, what you see in the browser, or what
you see when you view source?
< is going to appear as a < in the browser. if you view source you
should see <.
please specify.
chris.