note 34678 deleted from function.strip-tags by vrana

From: Date: Mon, 22 Dec 2003 16:34:03 +0000
Subject: note 34678 deleted from function.strip-tags by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62343@lists.php.net to get a copy of this message
Note Submitter: sqr@abv.bg ---- 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.

« previous php.notes (#62343) next »