|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-09-03 20:21 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2020-09-03 20:21 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 18:00:01 2025 UTC |
Description: ------------ When executing the strip_tags function, using a string that starts with the lesser then or equal operator, it will be deleted... I accidentally found this out when stripping tags of an array with values, used for a <select>-element. When I strip the string '<= (Less then or equal)', it will result into an empty string. I also tried to add it to the $allowable_tags parameter, like this strip_tags('<= (Less then or equal)', '<=>'), but this doesn't seem to work either. Test script: --------------- <?php $array = [ '= (Equal)', '!= (Not equal)', '> (Greater then)', '>= (Greater then or equal)', '< (Less then)', '<= (Less then or equal)', ]; foreach( $array as $key => $value ) { echo $key."\t=>\t".strip_tags($value)."\n"; } Expected result: ---------------- 0 => = (Equal) 1 => != (Not equal) 2 => > (Greater then) 3 => >= (Greater then or equal) 4 => < (Less then) 5 => <= (Less then or equal) Actual result: -------------- 0 => = (Equal) 1 => != (Not equal) 2 => > (Greater then) 3 => >= (Greater then or equal) 4 => < (Less then) 5 =>