别字 转移-->转义

This commit is contained in:
JessonChan
2012-10-14 22:37:56 +08:00
parent 3515f71d00
commit 428a82a841

2
4.3.md
View File

@@ -54,7 +54,7 @@
t, err := template.New("foo").Parse(`{{define "T"}}Hello, {{.}}!{{end}}`)
err = t.ExecuteTemplate(out, "T", "<script>alert('you have been pwned')</script>")
之后的输出:
之后的输出:
Hello, &lt;script&gt;alert(&#39;you have been pwned&#39;)&lt;/script&gt;!