HTML filter that is HTML5 compliant
The php tidy extension can be configured to recognize html5 tags. http://tidy.sourceforge.net/docs/quickref.html#new-blocklevel-tags
The php tidy extension can be configured to recognize html5 tags. http://tidy.sourceforge.net/docs/quickref.html#new-blocklevel-tags
Because this question is tagged with regex I’m going to answer with poor man’s solution in this situation: $html = preg_replace(‘#<script(.*?)>(.*?)</script>#is’, ”, $html); However, regular expressions are not for parsing HTML/XML, even if you write the perfect expression it will break eventually, it’s not worth it, although, in some cases it’s useful to quickly fix … Read more