#50847 [Opn->Ver]: strip_tags() fails with extremely long tags (attributes)
| From: | jani@php.net | Date: | Tue, 26 Jan 2010 17:17:46 +0000 |
| Subject: | #50847 [Opn->Ver]: strip_tags() fails with extremely long tags (attributes) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146962@lists.php.net to get a copy of this message | ||
ID: 50847
Updated by: jani@php.net
-Summary: strip_tags() removes long param tags even when param
is in the exclude list
Reported By: grayson at levy dot org dot il
-Status: Open
+Status: Verified
-Bug Type: Unknown/Other Function
+Bug Type: Strings related
-Operating System: Red Hat
+Operating System: *
-PHP Version: 5.2.12
+PHP Version: 5.*, 6
Previous Comments:
------------------------------------------------------------------------
[2010-01-26 15:06:38] grayson at levy dot org dot il
Description:
------------
strip_tags() removes long param tags even when param is in the exclude
list.
Reproduce code:
---------------
$var = "<param
value=\"file=http://www.whitehouse.gov/videos/2010/January/011910_FallsChurchVA.m4v&path_to_plugins=http://www.whitehouse.gov/sites/default/modules/wh_multimedia/wh_jwplayer/plugins&path_to_player=http://www.whitehouse.gov/sites/all/modules/swftools/shared/flash_media_player&skin=http://www.whitehouse.gov/sites/all/modules/swftools/shared/flash_media_player/skins/EOP_skin.swf&captions_url=http://www.whitehouse.gov/sites/default/files/av_closedcaption/011910_Race_to_the_Top_for_Education_Reform.srtI=http://www.whitehouse.gov/sites/default/files/audio-video/video_thumbnail/P011910LJ-0100-3_0.jpg&controlbar=bottom&frontcolor=AAAAAA&plugins=http://www.whitehouse.gov/sites/default/modules/wh_multimedia/wh_jwplayer/plugins/privacy/privacy,http://www.whitehouse.gov/sites/default/modules/wh_multimedia/wh_jwplayer/plugins/hat/hat,http://www.whitehouse.gov/sites/default/modules/wh_multimedia/wh_jwplayer/plugins/share/share,http://www.whitehouse.gov/sites/default/modules/wh_multimedia/!
wh_jwplayer/plugins/captions/captions&captions.file=http://www.whitehouse.gov/sites/default/files/av_closedcaption/011910_Race_to_the_Top_for_Education_Reform.srt\"
name=\"flashvars\" />";
$var = strip_tags($var, "<param>");
Expected result:
----------------
$var should be unchanged.
Actual result:
--------------
$var is empty.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50847&edit=1