Re: Htmlentities vs htmlspecialchars

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 26 Jul 2006 14:59:46 +0200, Jochem Maas wrote:

> 
> I wonder if anyone can given a solid answer to this?
If I remember correctly, htmlspecialchars does what its name indicate:
konvert any character with special meaning according to the HTML
specification. htmlentities converts any character to its HTML
representation.

One caveat of using htmlentities is that it is really hard to read for a
human being, but as long as the output is only used inside a browser there
is no problem. Nowadays I do a lot of XML stuff which only leaves one
option: htmlentities. Another thing: PHP is designed to be used on the web
in browser so htmlspecialchars, in my opinion, is redundant.

-- 
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux