Bug #67869 [NEW]: FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly
| From: | heurika at gmail dot com | Date: | Wed, 20 Aug 2014 08:00:29 +0000 |
| Subject: | Bug #67869 [NEW]: FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-187191@lists.php.net to get a copy of this message | ||
From: heurika at gmail dot com
Operating system: Debian 7
PHP version: 5.5.15
Package: Filter related
Bug Type: Bug
Bug description:FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly
Description:
------------
The function FILTER_SANITIZE_FULL_SPECIAL_CHARS doesn't returns the
chars equivalent to calling htmlspecialchars() with ENT_QUOTES set.
php.ini:
default_charset = "utf-8"
Test script:
---------------
<?php
$string = 'ð';
echo 'filter_var: ' . filter_var($string,
FILTER_SANITIZE_FULL_SPECIAL_CHARS) . PHP_EOL;
echo 'htmlspecialchars: ' . htmlspecialchars($string, ENT_QUOTES);
Expected result:
----------------
filter_var: ð
htmlspecialchars: ð
Actual result:
--------------
filter_var: �
htmlspecialchars: ð
--
Edit bug report at https://bugs.php.net/bug.php?id=67869&edit=1
--