From ca21b5880520c55091720f03b5aaffcab85081d3 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Thu, 8 Nov 2007 18:31:26 +0000 Subject: Always lowercase HTML tags in it_html::sanitize() --- it_html.class | 2 ++ 1 file changed, 2 insertions(+) (limited to 'it_html.class') diff --git a/it_html.class b/it_html.class index 958fe39..5632b78 100644 --- a/it_html.class +++ b/it_html.class @@ -383,6 +383,7 @@ function sanitize($html) { # Simple tags with content, no attributes kept list($head, $tagname, $content, $tail) = $tag; + $tagname = strtolower($tagname); $result .= it_html::sanitize($head) . "<$tagname>" . it_html::sanitize($content) . "" . it_html::sanitize($tail); } else if ($tag = it::match('(.*)]+?href="(' . $urlpattern . ')"[^>]*?>(.*?)(.*)', $html)) @@ -401,6 +402,7 @@ function sanitize($html) { # Simple tags without content, no attributes kept list($head, $tagname, $tail) = $tag; + $tagname = strtolower($tagname); $result .= it_html::sanitize($head) . "<$tagname />" . it_html::sanitize($tail); } else -- cgit v1.2.3