• Nodir Turakulov's avatar
    html/template: check "type" attribute in <script> · ffd1c781
    Nodir Turakulov authored
    Currently any script tag is treated as a javascript container, although
    <script type="text/template"> must not be. Check "type" attribute of
    "script" tag. If it is present and it is not a JS MIME type, do not
    transition to elementScript state.
    
    Fixes #12149, where // inside text template was treated as regexp.
    Fixes #6701
    
    Change-Id: I8fc9e504f7280bdd800f40383c061853665ac8a2
    Reviewed-on: https://go-review.googlesource.com/14336
    Run-TryBot: Russ Cox <rsc@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    ffd1c781
escape.go 24.9 KB