html/template: unidentified node type in allIdents (3)
dvyukov opened this issue · 1 comments
dvyukov commented
The following program crashes with the panic:
package main
import (
"html/template"
"io/ioutil"
)
func main() {
t, err := template.New("foo").Parse("{{0|$}}")
if err != nil {
return
}
t.Execute(ioutil.Discard, nil)
}
panic: unidentified node type in allIdents
goroutine 1 [running]:
html/template.allIdents(0x7f4ee098c260, 0xc208016870, 0x0, 0x0, 0x0)
src/html/template/escape.go:218 +0x24e
html/template.ensurePipelineContains(0xc208014230, 0xc208016b10, 0x1, 0x3)
src/html/template/escape.go:244 +0x1cd
html/template.(*escaper).commit(0xc20807bcc8)
src/html/template/escape.go:751 +0x3ab
html/template.escapeTemplate(0xc208016780, 0x7f4ee098c2f0, 0xc2080167e0, 0x5c2c30, 0x3, 0x0, 0x0)
src/html/template/escape.go:39 +0x47b
html/template.(*Template).escape(0xc208016780, 0x0, 0x0)
src/html/template/template.go:85 +0x37f
html/template.(*Template).Execute(0xc208016780, 0x7f4ee098c1f0, 0xc20800a4b0, 0x0, 0x0, 0x0, 0x0)
src/html/template/template.go:101 +0x34
main.main()
htmltemplate.go:13 +0x3b7
go version devel +b0532a9 Mon Jun 8 05:13:15 2015 +0000 linux/amd64
gopherbot commented
CL https://golang.org/cl/10823 mentions this issue.