summaryrefslogtreecommitdiff
path: root/src/pkg/html/template/escape.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/html/template/escape.go')
-rw-r--r--src/pkg/html/template/escape.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pkg/html/template/escape.go b/src/pkg/html/template/escape.go
index 4829bfcc4..9ae9749db 100644
--- a/src/pkg/html/template/escape.go
+++ b/src/pkg/html/template/escape.go
@@ -35,11 +35,13 @@ func escapeTemplates(tmpl *Template, names ...string) error {
for _, name := range names {
if t := tmpl.set[name]; t != nil {
t.text.Tree = nil
+ t.Tree = nil
}
}
return err
}
tmpl.escaped = true
+ tmpl.Tree = tmpl.text.Tree
}
e.commit()
return nil
@@ -301,7 +303,7 @@ func indexOfStr(s string, strs []string, eq func(a, b string) bool) int {
return -1
}
-// escFnsEq returns whether the two escaping functions are equivalent.
+// escFnsEq reports whether the two escaping functions are equivalent.
func escFnsEq(a, b string) bool {
if e := equivEscapers[a]; e != "" {
a = e