note 17656 modified in function.strip-tags by vrana
| From: | vrana@php.net | Date: | Mon, 22 Dec 2003 15:34:46 +0000 |
| Subject: | note 17656 modified in function.strip-tags by vrana | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62320@lists.php.net to get a copy of this message | ||
strip_tags has doesn't recognize that css within the style tags are not document text. To fix
this do something similar to the following:
$htmlstring =
preg_replace("'<style[^>]*>.*</style>'siU",'',$htmlstring);
--was--
strip_tags has doesn't recognize that css within the style tags are not document text. To fix
this do something similar to the following:
$htmlstring =
preg_replace("'<style[^>]*?>.*?</style>'si",'',$htmlstring);
http://www.php.net/manual/en/function.strip-tags.php