diff options
author | Christian Schneider | 2007-11-08 18:31:26 +0000 |
---|---|---|
committer | Christian Schneider | 2007-11-08 18:31:26 +0000 |
commit | ca21b5880520c55091720f03b5aaffcab85081d3 (patch) | |
tree | 8a6b3d1b4b7c9fbda6e1040e37f2464fe30bbf17 /it_html.class | |
parent | 036512e56327b8813da1a5c5f4f60de435d12554 (diff) | |
download | itools-ca21b5880520c55091720f03b5aaffcab85081d3.tar.gz itools-ca21b5880520c55091720f03b5aaffcab85081d3.tar.bz2 itools-ca21b5880520c55091720f03b5aaffcab85081d3.zip |
Always lowercase HTML tags in it_html::sanitize()
Diffstat (limited to 'it_html.class')
-rw-r--r-- | it_html.class | 2 |
1 files changed, 2 insertions, 0 deletions
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) . "</$tagname>" . it_html::sanitize($tail); } else if ($tag = it::match('(.*)<a[^>]+?href="(' . $urlpattern . ')"[^>]*?>(.*?)</a>(.*)', $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 |