php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67636 FILTER_SANITIZE_STRING problem
Submitted: 2014-07-17 06:52 UTC Modified: 2014-07-24 10:11 UTC
From: izopi4a at gmail dot com Assigned:
Status: Not a bug Package: filter (PECL)
PHP Version: 5.5.14 OS: ubuntu 12.04
Private report: No CVE-ID: None
 [2014-07-17 06:52 UTC] izopi4a at gmail dot com
Description:
------------
Hello, since i am not a pro and i haven't submited a bug before, but i think there is a bug with FILTER_SANITIZE_STRING.

All chars are being cutter after < char in the string.

You can check my test script which is pretty simple.

I am sorry if it is my bad and I am doing something worng :(

Test script:
---------------
$query = ' this is ok so far < but this part here will be missing';

echo "<pre>";
print_r(filter_var ($query, FILTER_SANITIZE_STRING));
echo "</pre>";

Expected result:
----------------
this is ok so far &lt; but this part here will be missing

Actual result:
--------------
this is ok so far 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-07-24 10:11 UTC] yohgaki@php.net
-Status: Open +Status: Not a bug
 [2014-07-24 10:11 UTC] yohgaki@php.net
"All chars are being cutter after < char in the string."

Since it is supposed to strip tags, "< char in the string" is considered as a tag and stripped.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Dec 04 23:03:34 2021 UTC