Edit report at https://bugs.php.net/bug.php?id=66111&edit=1
ID: 66111
Comment by: anon at anon dot anon
Reported by: 22rist at gmail dot com
Summary: strip_tags strip <=
Status: Open
Type: Bug
Package: Filter related
Operating System: windows 7 x64
PHP Version: 5.5Git-2013-11-18 (Git)
Block user comment: N
Private report: N
New Comment:
strip_tags converts HTML to plain text. If you're typing "Mileage <= 15000",
that's not HTML, it's text, so strip_tags is the wrong function. Use htmlspecialchars.
Previous Comments:
------------------------------------------------------------------------
[2013-11-18 08:33:10] 22rist at gmail dot com
Description:
------------
Very hard to explain copywriter, that he should not use "<=" in his text for security
purposes.
Test script:
---------------
$text = "Mileage <= 15000";
print_r(strip_tags($text));
//print: Mileage
Expected result:
----------------
Mileage <= 15000
Actual result:
--------------
Mileage
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66111&edit=1