Skip to content

Commit 57c44fd

Browse files
committed
html/template: document comment stripping
Fixes #28628 Change-Id: I8b68f55f25e62f747d7cc48a490fec7f426f53d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/658115 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: David Chase <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 7dd7d70 commit 57c44fd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/html/template/doc.go

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ HTML templates treat data values as plain text which should be encoded so they
2828
can be safely embedded in an HTML document. The escaping is contextual, so
2929
actions can appear within JavaScript, CSS, and URI contexts.
3030
31+
Comments are stripped from output, except for those passed in via the
32+
[HTML], [CSS], and [JS] types for their respective contexts.
33+
3134
The security model used by this package assumes that template authors are
3235
trusted, while Execute's data parameter is not. More details are
3336
provided below.

0 commit comments

Comments
 (0)