AutoPagerize

By swdyh Last update Dec 28, 2011 — Installed 834,249 times.

little problem with strip_html_tag()

in
Subscribe to little problem with strip_html_tag() 1 post, 1 voice

buergi User

hi swdyh,
i stumbled upon a little problem with the strip_html_tag() function.
e.g. in this webside [1] it strips way to much code, since the included script contains <html> tags too.

as a quick fix i changed the regex into the following
/^[^(<html>)]*<html>]*)?>|<\/html[ \t\r\n]*>[^<\/html>]*$/ig

[1] http://www.spirituosen-volland.de/unterthurner0...</html></html>

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel