We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following program crashes with panic:
package main import ( "html/template" "io/ioutil" ) func main() { t, err := template.New("foo").Parse(string(data)) if err != nil { return } t.Execute(ioutil.Discard, nil) } var data = "{{else}}"
panic: escaping {{else}} is unimplemented goroutine 1 [running]: html/template.(*escaper).escape(0xc208010540, 0x0, 0x0, 0x7f73f1e9a2b0, 0xc20800e460, 0x700000000000000, 0x0) src/html/template/escape.go:133 +0x449 html/template.(*escaper).escapeList(0xc208010540, 0x0, 0x0, 0xc2080147e0, 0x0, 0x0) src/html/template/escape.go:440 +0x1c9 html/template.(*escaper).escapeListConditionally(0xc208010500, 0x0, 0x0, 0xc2080147e0, 0xc2080419b0, 0x0, 0x0, 0x7f73f2046000) src/html/template/escape.go:455 +0x4be html/template.(*escaper).escapeTemplateBody(0xc208010500, 0x0, 0x0, 0xc208010440, 0x0, 0x0, 0x8700000000000002) src/html/template/escape.go:573 +0x1e2 html/template.(*escaper).computeOutCtx(0xc208010500, 0x0, 0x0, 0xc208010440, 0x0, 0x0) src/html/template/escape.go:534 +0xc9 html/template.(*escaper).escapeTree(0xc208010500, 0x0, 0x0, 0x7f73f1e9a2f8, 0xc2080147e0, 0x5ba240, 0x3, 0x0, 0x0, 0x0, ...) src/html/template/escape.go:527 +0x77f html/template.escapeTemplate(0xc2080146f0, 0x7f73f1e9a2f8, 0xc2080147e0, 0x5ba240, 0x3, 0x0, 0x0) src/html/template/escape.go:23 +0x334 html/template.(*Template).escape(0xc2080146f0, 0x0, 0x0) src/html/template/template.go:85 +0x35d html/template.(*Template).Execute(0xc2080146f0, 0x7f73f1e9a288, 0xc20800a4c0, 0x0, 0x0, 0x0, 0x0) src/html/template/template.go:101 +0x37 main.main() /tmp/htmltempl.go:13 +0x290
on commit ccc76db
The text was updated successfully, but these errors were encountered:
The problem is in text/template, which should have rejected this template.
Sorry, something went wrong.
CL https://golang.org/cl/9620 mentions this issue.
80cedf3
No branches or pull requests
The following program crashes with panic:
on commit ccc76db
The text was updated successfully, but these errors were encountered: