note 78509 deleted from function.htmlentities by danbrown

From: Date: Sun, 17 May 2009 16:52:38 +0000
Subject: note 78509 deleted from function.htmlentities by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154904@lists.php.net to get a copy of this message
Note Submitter: SR ---- There's no sane reason to use htmlentities() instead of htmlspecialchars(). As long as you specify the charset of a page with a Content-Type meta in the head of a page (which you should ALWAYS do in the first place), escaping all characters is completely pointless and will only grow the size of your page. Only the special HTML characters (<, >, &, etc.) need to be escaped, which is exactly what htmlspecialchars() does.

« previous php.notes (#154904) next »