note 115441 added to migration54.incompatible
| From: | ky dot patterson at adlinkr dot com | Date: | Wed, 23 Jul 2014 19:34:46 +0000 |
| Subject: | note 115441 added to migration54.incompatible | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200043@lists.php.net to get a copy of this message | ||
If you have content that is not 100% UTF-8 then TAKE NOTE:
Starting in PHP 5.4 htmlspecialchars() and htmlentities() assume charset=UTF-8 by default AND WILL
RETURN BLANK IF YOUR INPUT IS NOT VALID UTF-8.
So if you have a lot of function calls that look like this:
<?php
echo htmlspecialchars($input);
// or
echo htmlentities($input);
?>
i.e. no charset and no flags -- and $input is ISO-8859 (or anything else apart from 7-bit ASCII or
UTF-8) -- then PHP 5.4 and 5.5 will return an empty string, and you will be surprised and probably
unhappy.
This is apparently a feature, not a bug.
----
Server IP: 64.68.201.35
Probable Submitter: 99.233.236.58
----
Manual Page -- http://php.net/manual/en/migration54.incompatible.php
Edit -- https://master.php.net/note/edit/115441
Del: integrated -- https://master.php.net/note/delete/115441/integrated
Del: useless -- https://master.php.net/note/delete/115441/useless
Del: bad code -- https://master.php.net/note/delete/115441/bad+code
Del: spam -- https://master.php.net/note/delete/115441/spam
Del: non-english -- https://master.php.net/note/delete/115441/non-english
Del: in docs -- https://master.php.net/note/delete/115441/in+docs
Del: other reasons-- https://master.php.net/note/delete/115441
Reject -- https://master.php.net/note/reject/115441
Search -- https://master.php.net/manage/user-notes.php