html/template: HTMLEscapeString duplicates functionality found in package html #20957
Labels
FrozenDueToAge
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
This is a very minor issue.
I noticed today that
html/template.HTMLEscapeString()
andhtml.EscapeString()
do have separate, independent implementations.Why?
Is it possible (or even desirable) to unify them?
EDIT: The former has some additional small optimizations that do not appear in the latter: (1) avoid allocation by early bailout; and (2) avoid creating package-global
strings.Replacer
var.The text was updated successfully, but these errors were encountered: