summaryrefslogtreecommitdiff
path: root/it_html.class
diff options
context:
space:
mode:
authorChristian Schneider2022-09-08 14:23:47 +0200
committerChristian Schneider2022-09-08 14:23:47 +0200
commit0954d7dfc7d3a776bb3e7a5039c85015b8837c90 (patch)
tree01ac8348a9a3cf3a3c246842acbd3d798aa64e74 /it_html.class
parentda836732e343cc9e093939fdf2215b10e21c0966 (diff)
downloaditools-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.class2
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;