php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57065 FILTER_SANITIZE_ENCODED : FILTER_FLAG_ENCODE_* has no effects
Submitted: 2006-06-06 06:39 UTC Modified: 2006-07-21 22:20 UTC
From: c dot lecocq at pixandlog dot com Assigned: pajoye (profile)
Status: Closed Package: filter (PECL)
PHP Version: Irrelevant OS: Gentoo Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: c dot lecocq at pixandlog dot com
New email:
PHP Version: OS:

 

 [2006-06-06 06:39 UTC] c dot lecocq at pixandlog dot com
Description:
------------
When used with the SANITIZE_ENCODED filter, FILTER_FLAG_ENCODE_HIGH and FILTER_FLAG_ENCODE_LOW flags has no effects : according to the doc, chars <0x20 and/or >=0x80 should be encoded in HTML entities but they are still URL encoded.

Reproduce code:
---------------
<?php
$variable = '?'.chr(13).chr(10).'?';
var_dump(filter_data($variable, FILTER_SANITIZE_ENCODED));
var_dump(filter_data($variable, FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH | FILTER_FLAG_ENCODE_LOW));
?>

Expected result:
----------------
string(12) "%E9%0D%0A%E8"
string(22) "&#233;&#13;&#10;&#232;"

Actual result:
--------------
string(12) "%E9%0D%0A%E8"
string(12) "%E9%0D%0A%E8"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-21 22:20 UTC] pierre dot php at gmail dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

Already fixed in cvs. A propos, '?' != 233 but 195 (C3).
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 22:01:26 2019 UTC