mirror of
https://github.com/russross/blackfriday.git
synced 2024-03-22 13:40:34 +08:00
Make isHtmlTag() case insensitive
This commit is contained in:
parent
a2fda5e98f
commit
b79e720a36
2
html.go
2
html.go
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user