Support » Requests and Feedback » strip_tags doesn’t strip in-post <style> sections
10 years, 5 months ago
I added the following to wp_trim_excerpt, just before the call to strip_tags()
$text = preg_replace(“‘<style[^>]*>.*</style>’siU”,”,$text);
so that CSS doesn’t make it into my post excerpts. It would be nice if strip_tags() did this, but lacking that, something like this should be added wherever strip_tags is called…..