php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67869 FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly
Submitted: 2014-08-20 08:00 UTC Modified: 2020-12-20 04:22 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: heurika at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: Filter related
PHP Version: 5.5.15 OS: Debian 7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: heurika at gmail dot com
New email:
PHP Version: OS:

 

 [2014-08-20 08:00 UTC] 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: ?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-18 13:32 UTC] cmb@php.net
I can't reproduce the issue, see <http://3v4l.org/uQ1C5>.
 [2020-06-04 12:38 UTC] 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>
 [2020-12-07 16:49 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-12-20 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Mar 03 04:01:23 2021 UTC