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 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

Pull Requests

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: Tue Dec 03 09:01:31 2024 UTC