aboutsummaryrefslogtreecommitdiff
path: root/src/html/template/js.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/html/template/js.go')
-rw-r--r--src/html/template/js.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/html/template/js.go b/src/html/template/js.go
index 8f1185c81e..6434fa3be6 100644
--- a/src/html/template/js.go
+++ b/src/html/template/js.go
@@ -368,9 +368,10 @@ func isJSIdentPart(r rune) bool {
// It is used to determine whether a script tag with a type attribute is a javascript container.
func isJSType(mimeType string) bool {
// per
- // http://www.w3.org/TR/html5/scripting-1.html#attr-script-type
+ // https://www.w3.org/TR/html5/scripting-1.html#attr-script-type
// https://tools.ietf.org/html/rfc7231#section-3.1.1
- // http://tools.ietf.org/html/rfc4329#section-3
+ // https://tools.ietf.org/html/rfc4329#section-3
+ // https://www.ietf.org/rfc/rfc4627.txt
// discard parameters
if i := strings.Index(mimeType, ";"); i >= 0 {
@@ -381,6 +382,7 @@ func isJSType(mimeType string) bool {
case
"application/ecmascript",
"application/javascript",
+ "application/json",
"application/x-ecmascript",
"application/x-javascript",
"text/ecmascript",