note 107142 added to function.html-entity-decode
| From: | Gundars at osu1 dot php dot net | Date: | Tue, 10 Jan 2012 17:40:12 +0000 |
| Subject: | note 107142 added to function.html-entity-decode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-185522@lists.php.net to get a copy of this message | ||
Please note that "Anonymous 02-Oct-2008 11:40" author is wrong saying "The previous
post seems incorrect. Even if PHP sets the charset, it can be overridden if HTML charsets are sent
via META tags beforehand."
HTML may override it on display, but the ENT_QUOTES in syntax addslashes(html_entity_decode($x,
ENT_QUOTES); is neccesery, when converting text before adding it to mysql_query.
Without ENT_QUOTES text will read fine utf-8, except hexdec symbols. Leaving out ENT_QUOTES results
in " ' " being inserted as '
----
Server IP: 69.147.83.197
Probable Submitter: 78.84.2.214
----
Manual Page -- http://www.php.net/manual/en/function.html-entity-decode.php
Edit -- https://master.php.net/note/edit/107142
Del: integrated -- https://master.php.net/note/delete/107142/integrated
Del: useless -- https://master.php.net/note/delete/107142/useless
Del: bad code -- https://master.php.net/note/delete/107142/bad+code
Del: spam -- https://master.php.net/note/delete/107142/spam
Del: non-english -- https://master.php.net/note/delete/107142/non-english
Del: in docs -- https://master.php.net/note/delete/107142/in+docs
Del: other reasons-- https://master.php.net/note/delete/107142
Reject -- https://master.php.net/note/reject/107142
Search -- https://master.php.net/manage/user-notes.php