note 78509 added to function.htmlentities
| From: | SR at osu1 dot php dot net | Date: | Mon, 15 Oct 2007 19:57:00 +0000 |
| Subject: | note 78509 added to function.htmlentities | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131407@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 216.235.15.211
Probable Submitter: 206.162.167.230
----
Manual Page -- http://www.php.net/manual/en/function.htmlentities.php
Edit -- https://master.php.net/note/edit/78509
Del: integrated -- https://master.php.net/note/delete/78509/integrated
Del: useless -- https://master.php.net/note/delete/78509/useless
Del: bad code -- https://master.php.net/note/delete/78509/bad+code
Del: spam -- https://master.php.net/note/delete/78509/spam
Del: non-english -- https://master.php.net/note/delete/78509/non-english
Del: in docs -- https://master.php.net/note/delete/78509/in+docs
Del: other reasons-- https://master.php.net/note/delete/78509
Reject -- https://master.php.net/note/reject/78509
Search -- https://master.php.net/manage/user-notes.php