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
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: 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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 04:01:28 2024 UTC