note 34678 added to function.strip-tags

From: Date: Sun, 03 Aug 2003 19:21:29 +0000
Subject: note 34678 added to function.strip-tags
Groups: php.notes 
Request: Send a blank email to php-notes+get-53276@lists.php.net to get a copy of this message
concerning the <script> tags: a more appropriate way to get rid of them should be: preg_replace('{<(script)>((?!</\1>).)*</\1>}is', '[SCRIPT_ABOLISHED]', $text); instead of the givern above: $description = ereg_replace("/<script[^>]*>[^<]+<\/script>/is", "", $description); as long the latter fails if inside the script there is something like "<=", ">=", etc. ---- Manual Page -- http://www.php.net/manual/en/function.strip-tags.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34678 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34678&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34678&report=yes

« previous php.notes (#53276) next »