Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
bcb7a853
Commit
bcb7a853
authored
Feb 20, 2012
by
David Symonds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
html/template: minor tweak to docs to improve HTML typography.
R=golang-dev, r CC=golang-dev
https://golang.org/cl/5684046
parent
463009ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/pkg/html/template/doc.go
src/pkg/html/template/doc.go
+3
-3
No files found.
src/pkg/html/template/doc.go
View file @
bcb7a853
...
@@ -172,18 +172,18 @@ This package assumes that template authors are trusted, that Execute's data
...
@@ -172,18 +172,18 @@ This package assumes that template authors are trusted, that Execute's data
parameter is not, and seeks to preserve the properties below in the face
parameter is not, and seeks to preserve the properties below in the face
of untrusted data:
of untrusted data:
Structure Preservation Property
Structure Preservation Property
:
"... when a template author writes an HTML tag in a safe templating language,
"... when a template author writes an HTML tag in a safe templating language,
the browser will interpret the corresponding portion of the output as a tag
the browser will interpret the corresponding portion of the output as a tag
regardless of the values of untrusted data, and similarly for other structures
regardless of the values of untrusted data, and similarly for other structures
such as attribute boundaries and JS and CSS string boundaries."
such as attribute boundaries and JS and CSS string boundaries."
Code Effect Property
Code Effect Property
:
"... only code specified by the template author should run as a result of
"... only code specified by the template author should run as a result of
injecting the template output into a page and all code specified by the
injecting the template output into a page and all code specified by the
template author should run as a result of the same."
template author should run as a result of the same."
Least Surprise Property
Least Surprise Property
:
"A developer (or code reviewer) familiar with HTML, CSS, and JavaScript, who
"A developer (or code reviewer) familiar with HTML, CSS, and JavaScript, who
knows that contextual autoescaping happens should be able to look at a {{.}}
knows that contextual autoescaping happens should be able to look at a {{.}}
and correctly infer what sanitization happens."
and correctly infer what sanitization happens."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment