The Little Guy Posted February 14, 2007 Share Posted February 14, 2007 I am using this, to strip tags, but I want to allow these 3 tags: <? <?php ?> Here is the code I'm using $comment = strip_tags(addslashes(findURL($_POST['comment'])),'<??><?php?>'); It is removing everything between the tags how can I allow it? Link to comment https://forums.phpfreaks.com/topic/38410-strip_tags/ Share on other sites More sharing options...
fert Posted February 14, 2007 Share Posted February 14, 2007 $comment = strip_tags(addslashes(findURL($_POST['comment'])),'<?,?>,<?php,?>'); Link to comment https://forums.phpfreaks.com/topic/38410-strip_tags/#findComment-184233 Share on other sites More sharing options...
The Little Guy Posted February 14, 2007 Author Share Posted February 14, 2007 nope, didn't work Link to comment https://forums.phpfreaks.com/topic/38410-strip_tags/#findComment-184236 Share on other sites More sharing options...
Jessica Posted February 14, 2007 Share Posted February 14, 2007 You could try using str_replace to first set them to something else such as and then after you take out the rest, replace them back. Link to comment https://forums.phpfreaks.com/topic/38410-strip_tags/#findComment-184249 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.