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: user-supplied Funcs can be overwritten #13852

Closed
okdave opened this issue Jan 7, 2016 · 1 comment
Closed

html/template: user-supplied Funcs can be overwritten #13852

okdave opened this issue Jan 7, 2016 · 1 comment

Comments

@okdave
Copy link
Contributor

okdave commented Jan 7, 2016

If a user defines their own function to template.Funcs that happens to have the same name as one of the internal escaping functions (such as "html_template_htmlescaper"), the user's function will be silently overwritten: http://play.golang.org/p/C3ER2PBU1P

This isn't a huge issue, but it does seem like a smell since it's something we can detect/prevent.

@bradfitz bradfitz added this to the Go1.7 milestone Jan 21, 2016
@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Apr 5, 2017
@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