• Didier Spezia's avatar
    html/template: fix pipeline sanitization · 91d989eb
    Didier Spezia authored
    Pipelines are altered by inserting sanitizers if they are not
    already present. The code makes the assumption that the first
    operands of each commands are function identifiers.
    
    This is wrong, since they can also be methods. It results in
    a panic with templates such as {{1|print 2|.f 3}}
    
    Adds an extra type assertion to make sure only identifiers
    are compared with sanitizers.
    
    Fixes #10673
    
    Change-Id: I3eb820982675231dbfa970f197abc5ef335ce86b
    Reviewed-on: https://go-review.googlesource.com/9801Reviewed-by: 's avatarRob Pike <r@golang.org>
    91d989eb
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...