diff options
author | Christian Schneider | 2022-09-08 14:23:47 +0200 |
---|---|---|
committer | Christian Schneider | 2022-09-08 14:23:47 +0200 |
commit | 0954d7dfc7d3a776bb3e7a5039c85015b8837c90 (patch) | |
tree | 01ac8348a9a3cf3a3c246842acbd3d798aa64e74 /it_html.class | |
parent | da836732e343cc9e093939fdf2215b10e21c0966 (diff) | |
download | itools-0954d7dfc7d3a776bb3e7a5039c85015b8837c90.tar.gz itools-0954d7dfc7d3a776bb3e7a5039c85015b8837c90.tar.bz2 itools-0954d7dfc7d3a776bb3e7a5039c85015b8837c90.zip |
Fix it_html::sanitize with nested tags
Diffstat (limited to 'it_html.class')
-rw-r--r-- | it_html.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_html.class b/it_html.class index 913d018..5a2fb68 100644 --- a/it_html.class +++ b/it_html.class @@ -409,7 +409,7 @@ static function sanitize($html) $html = it::replace(array('[\0\s]+' => " "), $html); # \s also matches \r and \n $urlpattern = 'https?://[^">]+'; - if ($tag = it::match("(.*)<(div|p|i|b|strong|h[1-6])\b[^>]*>(.*?)</\\2>(.*)", $html)) + if ($tag = it::match("(.*?)<(div|p|i|b|strong|h[1-6])\b[^>]*>(.*?)</\\2>(.*)", $html)) { # Simple tags with content, no attributes kept list($head, $tagname, $content, $tail) = $tag; |