Bug #67869 [Opn->Fbk]: FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly

From: Date: Mon, 07 Dec 2020 16:49:10 +0000
Subject: Bug #67869 [Opn->Fbk]: FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230914@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 +Status: Feedback Type: Bug Package: Filter related Operating System: Debian 7 PHP Version: 5.5.15 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2020-06-04 12:38:23] cmb@php.net Can anybody else reproduce this with any of the actively supported PHP versions[1]? [1] <https://www.php.net/supported-versions.php> ------------------------------------------------------------------------ [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

« previous php.bugs (#230914) next »