mirror of
https://github.com/golang/go
synced 2024-11-26 20:01:19 -07:00
text/html: escape MIME type "application/ld+json" as JavaScript
Fixes #26053
Change-Id: Ic2052b1d0d4e0826a217a520c83d7bb0995ea72a
GitHub-Last-Rev: 5a3eea3dd2
GitHub-Pull-Request: golang/go#26054
Reviewed-on: https://go-review.googlesource.com/c/120835
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
This commit is contained in:
parent
c3b9a723bb
commit
784d810976
@ -391,6 +391,7 @@ func isJSType(mimeType string) bool {
|
||||
"application/ecmascript",
|
||||
"application/javascript",
|
||||
"application/json",
|
||||
"application/ld+json",
|
||||
"application/x-ecmascript",
|
||||
"application/x-javascript",
|
||||
"text/ecmascript",
|
||||
|
@ -343,6 +343,7 @@ func TestIsJsMimeType(t *testing.T) {
|
||||
{"application/javascript/version=1.8", false},
|
||||
{"text/javascript", true},
|
||||
{"application/json", true},
|
||||
{"application/ld+json", true},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
Loading…
Reference in New Issue
Block a user