summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_html.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it_html.class b/it_html.class
index fb26544..70994e7 100644
--- a/it_html.class
+++ b/it_html.class
@@ -395,7 +395,7 @@ function _strip_tags($html)
/**
* Return HTML with all evil things stripped. Allowed are a coupld of simple
- * tags like div, p, i, b, br without attributes, a with absolute href,
+ * tags like div, p, i, b, strong, h1 - h6, br without attributes, a with absolute href,
* img with absolute src url. Also ensures that tags are balanced.
* @param $html HTML string to be sanitized
* @return Sanitized HTML
@@ -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)\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;