Bug #67869 [Opn]: FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly
| From: | cmb@php.net | Date: | Thu, 04 Jun 2020 12:38:23 +0000 |
| Subject: | Bug #67869 [Opn]: FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-227317@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67869&edit=1
ID: 67869
Updated by: cmb@php.net
Reported by: heurika at gmail dot com
Summary: FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars
incorrectly
Status: Open
Type: Bug
Package: Filter related
Operating System: Debian 7
PHP Version: 5.5.15
Block user comment: N
Private report: N
New Comment:
Can anybody else reproduce this with any of the actively supported
PHP versions[1]?
[1] <https://www.php.net/supported-versions.php>
Previous Comments:
------------------------------------------------------------------------
[2015-05-18 13:32:25] cmb@php.net
I can't reproduce the issue, see <http://3v4l.org/uQ1C5>.
------------------------------------------------------------------------
[2014-08-20 08:00:28] heurika at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=67869&edit=1