Make isHtmlTag() case insensitive

pull/22/head
Vytautas Šaltenis 2013-04-13 22:34:37 +03:00
parent a2fda5e98f
commit b79e720a36
2 changed files with 4 additions and 1 deletions

View File

@ -664,7 +664,7 @@ func isHtmlTag(tag []byte, tagname string) bool {
break
}
if tag[i] != tagname[j] {
if strings.ToLower(string(tag[i]))[0] != tagname[j] {
return false
}
}

View File

@ -67,6 +67,9 @@ func TestRawHtmlTag(t *testing.T) {
tests := []string{
"zz <style>p {}</style>\n",
"<p>zz p {}</p>\n",
"zz <STYLE>p {}</STYLE>\n",
"<p>zz p {}</p>\n",
}
doTestsInlineParam(t, tests, 0, HTML_SKIP_STYLE)
}