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
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: izopi4a at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 16:01:31 2025 UTC