Navigation Menu

Skip to content
New issue

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

html/template: unidentified node type in allIdents (4) #11356

Closed
dvyukov opened this issue Jun 23, 2015 · 2 comments
Closed

html/template: unidentified node type in allIdents (4) #11356

dvyukov opened this issue Jun 23, 2015 · 2 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Jun 23, 2015

The following program crashes with the panic:

package main

import (
    "html/template"
    "io/ioutil"
)

func main() {
    t, err := template.New("foo").Parse("{{0|(nil)}}")
    if err != nil {
        return
    }
    t.Execute(ioutil.Discard, nil)
}
panic: unidentified node type in allIdents

goroutine 1 [running]:
html/template.allIdents(0x7f56da144280, 0xc8200d2140, 0x0, 0x0, 0x0)
    src/html/template/escape.go:220 +0x1f2
html/template.ensurePipelineContains(0xc8200d20f0, 0xc8200b0960, 0x1, 0x3)
    src/html/template/escape.go:246 +0x1cd
html/template.(*escaper).commit(0xc820147cb8)
    src/html/template/escape.go:753 +0x3ab
html/template.escapeTemplate(0xc8200b05d0, 0x7f56da144310, 0xc8200b0630, 0x5c1d10, 0x3, 0x0, 0x0)
    src/html/template/escape.go:39 +0x47b
html/template.(*Template).escape(0xc8200b05d0, 0x0, 0x0)
    src/html/template/template.go:85 +0x37f
html/template.(*Template).Execute(0xc8200b05d0, 0x7f56da1441c8, 0xc8200ae280, 0x0, 0x0, 0x0, 0x0)
    src/html/template/template.go:101 +0x34
main.main()
    htmltemplate.go:13 +0x

go version devel +514014c Thu Jun 18 15:54:35 2015 +0200 linux/amd64
with golang.org/cl/10823 applied

@dvyukov
Copy link
Member Author

dvyukov commented Jun 23, 2015

/cc @dspezia

@gopherbot
Copy link

CL https://golang.org/cl/10823 mentions this issue.

@mikioh mikioh added this to the Go1.5 milestone Jun 28, 2015
@golang golang locked and limited conversation to collaborators Jun 27, 2016
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants