diff options
Diffstat (limited to 'libgo/go/html/template/escape_test.go')
-rw-r--r-- | libgo/go/html/template/escape_test.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libgo/go/html/template/escape_test.go b/libgo/go/html/template/escape_test.go index 023ee57d597..f6ace496e7b 100644 --- a/libgo/go/html/template/escape_test.go +++ b/libgo/go/html/template/escape_test.go @@ -903,7 +903,7 @@ func TestErrors(t *testing.T) { }, { `<a href="{{if .F}}/foo?a={{else}}/bar/{{end}}{{.H}}">`, - "z:1:47: {{.H}} appears in an ambiguous URL context", + "z:1:47: {{.H}} appears in an ambiguous context within a URL", }, { `<a onclick="alert('Hello \`, @@ -1365,6 +1365,10 @@ func TestEscapeText(t *testing.T) { context{state: stateTag, element: elementScript}, }, { + `<script>`, + context{state: stateJS, jsCtx: jsCtxRegexp, element: elementScript}, + }, + { `<script>foo`, context{state: stateJS, jsCtx: jsCtxDivOp, element: elementScript}, }, @@ -1389,6 +1393,14 @@ func TestEscapeText(t *testing.T) { context{state: stateText}, }, { + `<script type="text/template">`, + context{state: stateText}, + }, + { + `<script type="notjs">`, + context{state: stateText}, + }, + { `<Script>`, context{state: stateJS, element: elementScript}, }, |