]> Cypherpunks repositories - gostls13.git/commit
html/template: ignore case when handling type attribute in script element
authorSamuel Tan <samueltan@google.com>
Thu, 13 Apr 2017 17:57:04 +0000 (10:57 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 20 Apr 2017 18:53:09 +0000 (18:53 +0000)
commitf3f3f0d6d509bfaf30b55c0679cff366b50b7eae
tree0643b323126543173b8ac3e3db93bbf970399a08
parent263ba3ac7b9062e22f9dbbc6f11bfb760907de45
html/template: ignore case when handling type attribute in script element

Convert the parsed attribute name to lowercase before checking its value in
the HTML parser state machine. This ensures that the type attribute in
the script element is handled in a case-sensitive manner, just like all
other attribute names.

Fixes #19965

Change-Id: I806d8c62aada2c3b5b4328aff75f217ea60cb339
Reviewed-on: https://go-review.googlesource.com/40650
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/html/template/attr.go
src/html/template/escape_test.go
src/html/template/transition.go