summaryrefslogtreecommitdiff
path: root/doc/articles/wiki/index.html
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-05-02 15:44:55 +0200
committerOndřej Surý <ondrej@sury.org>2012-05-02 15:44:55 +0200
commit62e7d56f2c8706e5b88221cedac6769863ddf3b0 (patch)
treea48f46e27c9136335f8ab4db2da790556816554e /doc/articles/wiki/index.html
parent37370279cdb95edc1ebb298a957147c907907988 (diff)
parent0003ee229fd33ff46cb5f2fe1e35f5c0284debc4 (diff)
downloadgolang-62e7d56f2c8706e5b88221cedac6769863ddf3b0.tar.gz
Merge commit 'upstream/1.0.1' into debian-sid
Diffstat (limited to 'doc/articles/wiki/index.html')
-rw-r--r--doc/articles/wiki/index.html11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/articles/wiki/index.html b/doc/articles/wiki/index.html
index 52bf7e798..6c45d7178 100644
--- a/doc/articles/wiki/index.html
+++ b/doc/articles/wiki/index.html
@@ -359,10 +359,10 @@ First, we must add <code>html/template</code> to the list of imports:
<pre>
import (
+ <b>"html/template"</b>
"http"
"io/ioutil"
"os"
- <b>"html/template"</b>
)
</pre>
@@ -397,10 +397,11 @@ Template directives are enclosed in double curly braces.
The <code>printf "%s" .Body</code> instruction is a function call
that outputs <code>.Body</code> as a string instead of a stream of bytes,
the same as a call to <code>fmt.Printf</code>.
-The <code>|html</code> part of each directive pipes the value through the
-<code>html</code> formatter before outputting it, which escapes HTML
-characters (such as replacing <code>&gt;</code> with <code>&amp;gt;</code>),
-preventing user data from corrupting the form HTML.
+The <code>html/template</code> package helps guarantee that only safe and
+correct-looking HTML is generated by template actions. For instance, it
+automatically escapes any greater than sign (<code>&gt;</code>), replacing it
+with <code>&amp;gt;</code>, to make sure user data does not corrupt the form
+HTML.
</p>
<p>