|
|
|
Created:
13 years, 11 months ago by bjorn.tipling Modified:
13 years, 11 months ago Reviewers:
r CC:
golang-dev, r, r2 Visibility:
Public. |
html/template: Added more explicit wording about examples and documentation.
Patch Set 1 #Patch Set 2 : diff -r 4a0c77722a5e https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 4a0c77722a5e https://go.googlecode.com/hg/ #
Total comments: 2
Patch Set 4 : diff -r 7e665c5da059 https://go.googlecode.com/hg/ #
Total comments: 2
Patch Set 5 : diff -r 7e665c5da059 https://go.googlecode.com/hg/ #Total messages: 12
|
bjorn.tipling
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
|
13 years, 11 months ago (2012年02月11日 19:25:35 UTC) #1 |
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
On 2012年02月11日 19:25:35, bjorn.tipling wrote: > Hello mailto:golang-dev@googlegroups.com, > > I'd like you to review this change to > https://go.googlecode.com/hg/ I thought some of the language in this part of the documentation was not explicit enough about when it was referring to text/template vs html/template. While you could simply assume that people reading the documentation for the html/template would know to also check text/template, I just thought it would be helpful and wouldn't hurt to add a line encouraging it.
http://codereview.appspot.com/5654062/diff/3002/src/pkg/html/template/doc.go File src/pkg/html/template/doc.go (right): http://codereview.appspot.com/5654062/diff/3002/src/pkg/html/template/doc.go#... src/pkg/html/template/doc.go:10: text/template documentation. good intention but we can be clearer and say, "use this". how about: Package template (html/template) implements data-driven templates for generating HTML output safe against code injection. It It provides the same interface as package text/template and should be used instead of text/template whenever the output is HTML. The documentation here focuses on the security features of the package. For information about how to program the templates themselves, see the documentation for text/template.
Agreed that's even better. Adding this now. On 2012年02月11日 20:39:42, r wrote: > http://codereview.appspot.com/5654062/diff/3002/src/pkg/html/template/doc.go > File src/pkg/html/template/doc.go (right): > > http://codereview.appspot.com/5654062/diff/3002/src/pkg/html/template/doc.go#... > src/pkg/html/template/doc.go:10: text/template documentation. > good intention but we can be clearer and say, "use this". > > how about: > > Package template (html/template) implements data-driven templates for generating > HTML output safe against code injection. It It provides the same interface as > package text/template and should be used instead of text/template whenever the > output is HTML. > > The documentation here focuses on the security features of the package. For > information about how to program the templates themselves, see the documentation > for text/template.
Hello golang-dev@googlegroups.com, r@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
one last tweak. http://codereview.appspot.com/5654062/diff/4003/src/pkg/html/template/doc.go File src/pkg/html/template/doc.go (right): http://codereview.appspot.com/5654062/diff/4003/src/pkg/html/template/doc.go#... src/pkg/html/template/doc.go:18: to safely parse and execute html templates. to parse and execute HTML templates safely.
Hello golang-dev@googlegroups.com, r@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
Oh that is a split infinitive isn't it. Oops. On 2012年02月12日 00:41:25, r wrote: > one last tweak. > > http://codereview.appspot.com/5654062/diff/4003/src/pkg/html/template/doc.go > File src/pkg/html/template/doc.go (right): > > http://codereview.appspot.com/5654062/diff/4003/src/pkg/html/template/doc.go#... > src/pkg/html/template/doc.go:18: to safely parse and execute html templates. > to parse and execute HTML templates safely.
http://codereview.appspot.com/5654062/diff/3002/src/pkg/html/template/doc.go File src/pkg/html/template/doc.go (right): http://codereview.appspot.com/5654062/diff/3002/src/pkg/html/template/doc.go#... src/pkg/html/template/doc.go:10: text/template documentation. On 2012年02月11日 20:39:42, r wrote: > good intention but we can be clearer and say, "use this". > > how about: > > Package template (html/template) implements data-driven templates for generating > HTML output safe against code injection. It It provides the same interface as > package text/template and should be used instead of text/template whenever the > output is HTML. > > The documentation here focuses on the security features of the package. For > information about how to program the templates themselves, see the documentation > for text/template. Done. http://codereview.appspot.com/5654062/diff/4003/src/pkg/html/template/doc.go File src/pkg/html/template/doc.go (right): http://codereview.appspot.com/5654062/diff/4003/src/pkg/html/template/doc.go#... src/pkg/html/template/doc.go:18: to safely parse and execute html templates. On 2012年02月12日 00:41:26, r wrote: > to parse and execute HTML templates safely. Done.
On 12/02/2012, at 12:05 PM, bjorn.tipling@gmail.com wrote: > Oh that is a split infinitive isn't it. Oops. that's OK, it's the lower-case html and binding of 'safely' that wanted fixing.
LGTM thanks
*** Submitted as http://code.google.com/p/go/source/detail?r=637fa427fef5 *** html/template: Added more explicit wording about examples and documentation. R=golang-dev, r, r CC=golang-dev http://codereview.appspot.com/5654062 Committer: Rob Pike <r@golang.org>