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 #10610

Closed
dvyukov opened this issue Apr 29, 2015 · 1 comment
Closed

html/template: unidentified node type in allIdents #10610

dvyukov opened this issue Apr 29, 2015 · 1 comment
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Apr 29, 2015

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 = "{{.|. urlquery}}"
panic: unidentified node type in allIdents

goroutine 1 [running]:
html/template.allIdents(0x7fc2b1c021e8, 0xc20800e480, 0x0, 0x0, 0x0)
    src/html/template/escape.go:216 +0x1f3
html/template.ensurePipelineContains(0xc208012190, 0xc208014b10, 0x1, 0x3)
    src/html/template/escape.go:242 +0x1ca
html/template.(*escaper).commit(0xc208010500)
    src/html/template/escape.go:749 +0x36e
html/template.escapeTemplate(0xc2080146f0, 0x7fc2b1c022c0, 0xc2080147e0, 0x5ba240, 0x3, 0x0, 0x0)
    src/html/template/escape.go:39 +0x510
html/template.(*Template).escape(0xc2080146f0, 0x0, 0x0)
    src/html/template/template.go:85 +0x35d
html/template.(*Template).Execute(0xc2080146f0, 0x7fc2b1c021c0, 0xc20800a4c0, 0x0, 0x0, 0x0, 0x0)
    src/html/template/template.go:101 +0x37
main.main()
    /tmp/htmltempl.go:13 +0x290

on commit ccc76db

@dvyukov dvyukov added this to the Go1.5 milestone Apr 29, 2015
@gopherbot
Copy link

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

@robpike robpike closed this as completed in 62fb472 May 5, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 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

3 participants