mirror of
https://github.com/golang/go
synced 2024-11-21 14:14:40 -07:00
effective go: fix erroneous quoting of ampersands that cropped up
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4937047
This commit is contained in:
parent
03e9ea5b74
commit
6731d47f99
@ -2954,8 +2954,7 @@ const templateStr = `
|
||||
</head>
|
||||
<body>
|
||||
{{if .}}
|
||||
<img src="http://chart.apis.google.com/chart?chs=300x300&amp;cht=qr&amp;choe=UTF-8&amp;chl={{urlquery .}}"
|
||||
/>
|
||||
<img src="http://chart.apis.google.com/chart?chs=300x300&cht=qr&choe=UTF-8&chl={{urlquery .}}" />
|
||||
<br>
|
||||
{{html .}}
|
||||
<br>
|
||||
@ -2994,7 +2993,7 @@ from data items passed to <code>templ.Execute</code>, in this case the
|
||||
form value.
|
||||
Within the template text (<code>templateStr</code>),
|
||||
double-brace-delimited pieces denote template actions.
|
||||
The piece from the <code>{{if .}}</code>
|
||||
The piece from <code>{{if .}}</code>
|
||||
to <code>{{end}}</code> executes only if the value of the current data item, called <code>.</code> (dot),
|
||||
is non-empty.
|
||||
That is, when the string is empty, this piece of the template is suppressed.
|
||||
|
@ -2884,7 +2884,7 @@ from data items passed to <code>templ.Execute</code>, in this case the
|
||||
form value.
|
||||
Within the template text (<code>templateStr</code>),
|
||||
double-brace-delimited pieces denote template actions.
|
||||
The piece from the <code>{{html "{{if .}}"}}</code>
|
||||
The piece from <code>{{html "{{if .}}"}}</code>
|
||||
to <code>{{html "{{end}}"}}</code> executes only if the value of the current data item, called <code>.</code> (dot),
|
||||
is non-empty.
|
||||
That is, when the string is empty, this piece of the template is suppressed.
|
||||
|
@ -31,8 +31,7 @@ const templateStr = `
|
||||
</head>
|
||||
<body>
|
||||
{{if .}}
|
||||
<img src="http://chart.apis.google.com/chart?chs=300x300&cht=qr&choe=UTF-8&chl={{urlquery .}}"
|
||||
/>
|
||||
<img src="http://chart.apis.google.com/chart?chs=300x300&cht=qr&choe=UTF-8&chl={{urlquery .}}" />
|
||||
<br>
|
||||
{{html .}}
|
||||
<br>
|
||||
|
Loading…
Reference in New Issue
Block a user