Re: htmlspecialchars()
| From: | Chris Shiflett | Date: | Thu, 25 Mar 2004 20:57:48 +0000 |
| Subject: | Re: htmlspecialchars() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181511@lists.php.net to get a copy of this message | ||
--- Anthony Ritter <tony@gonefishingguideservice.com> wrote:
> I tried the following using the call to htmlspecialchars()
>
> not sure why it is insn't working.
>
> I get the output:
> <a href='test'>Test</a>
>
> Thank you.
> TR
> ..................
> //script
>
> <?
> $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>
View source.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security - O'Reilly
Coming Fall 2004
HTTP Developer's Handbook - Sams
http://httphandbook.org/
PHP Community Site
http://phpcommunity.org/