Skip to content

HTMLRenderer crashes when special characters appear in digestsΒ #35

@herrsimon

Description

@herrsimon

Hello,

I just tried to generate a report out of a large number (~5000) of emails and scholar-alert-digest crashed with the following backtrace:

panic: template: layout:29666: unexpected "\\" in command

goroutine 1 [running]:
html/template.Must(...)
        /usr/lib/go/src/html/template/template.go:372
github.com/bzz/scholar-alert-digest/templates.(*HTMLRenderer).Render(0xc006d3f230, 0xafe5e0, 0xc000010018, 0xc00642d5c0, 0xc0022c1470, 0x0)
        /home/simon/git/scholar-alert-digest/templates/templates.go:232 +0x48a
main.main()
        /home/simon/git/scholar-alert-digest/main.go:154 +0x542

Unfortunately I don't know which email actually caused this but it looks like some sort of escaping problem before passing things to the go templating engine.

Command was go run main.go -l scholaralert -authors -html -refs on the current master branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions