| Age | Commit message (Collapse) | Author |
|
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
|
|
ErrorContext now has all the information it needs from the Node,
rather than depending on the template that contains it. This makes
it easier for html/template to generate correct locations in its
error messages.
Updated html/template to use this ability where it is easy, which is
not everywhere, but more work can probably push it through.
Fixes #8577.
LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/130620043
|
|
Fixes #8431.
LGTM=r
R=golang-codereviews, r, minux
CC=golang-codereviews
https://golang.org/cl/130830043
|
|
error
Fixes #7445.
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/94640043
|
|
LGTM=dsymonds, adg, crawshaw, r, bradfitz, campoy, nigeltao, sameer, iant, robsc, djd, michael.j.fromberger, gmlewis, adonovan, rsc
R=golang-codereviews, dsymonds, adg, crawshaw, r, nigeltao, sameer, iant, robsc, djd, michael.j.fromberger, gmlewis, adonovan, rsc
CC=golang-codereviews
https://golang.org/cl/98880043
|
|
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/96850043
|
|
It was said already but apparently not enough times.
Fixes #6985.
LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=golang-codereviews
https://golang.org/cl/86300043
|
|
1) The code to catch an exception marked the template as escaped
when it was not yet, which caused subsequent executions of the
template to not escape properly.
2) ensurePipelineContains needs to handled Field as well as
Identifier nodes.
Fixes #7379.
LGTM=mikesamuel
R=mikesamuel
CC=golang-codereviews
https://golang.org/cl/85240043
|
|
Fixes #7562.
LGTM=nigeltao
R=nigeltao
CC=golang-codereviews
https://golang.org/cl/81190044
|
|
R=golang-dev, gobot, bradfitz
CC=golang-dev
https://golang.org/cl/40810044
|
|
After text/template.Parse, all the templates may have changed, so
we need to set them all back to their unescaped state. The code
did this but (mea culpa) forgot to set the Tree field of the html/template
struct.
Since the Tree is reset during escaping, this only matters if an error
arises during escaping and we want to print a message.
Fixes #6459.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13877043
|
|
The root cause of the panic reported in https://code.google.com/p/go/issues/detail?id=5980
is that parse's Tree.Text wasn't being copied during the clone.
Fix this by adding and using a Copy method for parse.Tree.
Fixes #5980.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/12420044
|
|
The underlying parse tree is visible in text/template, so it should be visible here.
Done by copying the underlying *parse.Tree up to the top level of the struct, and then making sure it's kept up to date.
Fixes #6318.
R=mikesamuel
CC=golang-dev
https://golang.org/cl/13479044
|
|
There are a few different places in the code that escape
possibly-problematic characters like < > and &.
This one was the only one missing &, so add it.
This means that if you Marshal a string, you get the
same answer you do if you Marshal a string and
pass it through the compactor. (Ironically, the
compaction makes the string longer.)
Because html/template invokes json.Marshal to
prepare escaped strings for JavaScript, this changes
the form of some of the escaped strings, but not
their meaning.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12708044
|
|
Leftovers from 11699043
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12558046
|
|
The test isn't checking deliberate panics so catching them just makes the code longer.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/12420043
|
|
Fixes #5982.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/12387043
|
|
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/12396043
|
|
Phrases like "returns whether or not the image is opaque" could be
describing what the function does (it always returns, regardless of
the opacity) or what it returns (a boolean indicating the opacity).
Even when the "or not" is missing, the phrasing is bizarre.
Go with "reports whether", which is still clunky but at least makes
it clear we're talking about the return value.
These were edited by hand. A few were cleaned up in other ways.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/11699043
|
|
R=golang-dev, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/11095043
|
|
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7877045
|
|
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6727046
|
|
Take advantage of the new terminating statement rule.
R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/7712044
|
|
Fixes #4950.
R=golang-dev, peter
CC=golang-dev
https://golang.org/cl/7415046
|
|
This was never documented or properly implemented.
Fixes #3528.
R=mikesamuel, rsc
CC=golang-dev
https://golang.org/cl/7142048
|
|
Fixes #4634.
R=adg, kevlar
CC=golang-dev
https://golang.org/cl/7066053
|
|
Fixes #4420.
R=golang-dev, rsc, remyoudompheng
CC=golang-dev
https://golang.org/cl/6854080
|
|
Remove trailing whitespace in comments.
No other changes.
R=r
CC=golang-dev
https://golang.org/cl/6815053
|
|
Preparation for forthcoming CL 6624051: Will make it
easier to see if/what changes are incurred by it.
The alignment changes in this CL are due to CL 6610051
(fix to alignment heuristic) where it appears that an
old version of gofmt was run (and thus the correct
alignment updates were not done).
R=r
CC=golang-dev
https://golang.org/cl/6639044
|
|
They now show the correct name, the byte offset on the line, and context for the failed evaluation.
Before:
template: three:7: error calling index: index out of range: 5
After:
template: top:7:20: executing "three" at <index "hi" $>: error calling index: index out of range: 5
Here top is the template that was parsed to create the set, and the error appears with the action
starting at byte 20 of line 7 of "top", inside the template called "three", evaluating the expression
<index "hi" $>.
Also fix a bug in index: it didn't work on strings. Ouch.
Also fix bug in error for index: was showing type of index not slice.
The real previous error was:
template: three:7: error calling index: can't index item of type int
The html/template package's errors can be improved by building on this;
I'll do that in a separate pass.
Extends the API for text/template/parse but only by addition of a field and method. The
old API still works.
Fixes #3188.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6576058
|
|
Change the grammar so that field access is a proper operator.
This introduces a new node, ChainNode, into the public (but
actually internal) API of text/template/parse. For
compatibility, we only use the new node type for the specific
construct, which was not parseable before. Therefore this
should be backward-compatible.
Before, .X.Y was a token in the lexer; this CL breaks it out
into .Y applied to .X. But for compatibility we mush them
back together before delivering. One day we might remove
that hack; it's the simple TODO in parse.go/operand.
This change also provides grammatical distinction between
f
and
(f)
which might permit function values later, but not now.
Fixes #3999.
R=golang-dev, dsymonds, gri, rsc, mikesamuel
CC=golang-dev
https://golang.org/cl/6494119
|
|
This is the easy part of issue 3528.
(What to do about "noescape" is the hard part, left open.)
Update #3528.
R=mikesamuel, r, dsymonds
CC=golang-dev
https://golang.org/cl/6493113
|
|
Ran 'double.pl' on the pkg tree to identify doubled words.
One change to an error string return in x509; the rest are in comments.
Thanks to Matt Jibson for the idea.
R=golang-dev, bsiegert
CC=golang-dev
https://golang.org/cl/6344089
|
|
below do not support '.
This makes package html consistent with package text/template's
HTMLEscape function.
Fixes #3489.
R=rsc, mikesamuel, dsymonds
CC=golang-dev
https://golang.org/cl/5992071
|
|
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5866044
|
|
to bring it in line with text/template's interface.
Fixes #3296.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5843066
|
|
Fixes #3272.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5819046
|
|
Fixes #3281
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5819044
|
|
Execute's data is untrusted regardless of package.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5797062
|
|
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5730051
|
|
html/template test that uses it.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5714052
|
|
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5695067
|
|
Fixes #3094.
R=golang-dev, rsc, nigeltao
CC=golang-dev
https://golang.org/cl/5687065
|
|
While we're here, get rid of the old names for the escaping functions.
Fixes #3073.
R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5685049
|
|
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5684046
|
|
Fixes #3053.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5656094
|
|
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5676064
|
|
return (*Template, error), not just *Template.
Fixes #2757.
R=r
CC=golang-dev
https://golang.org/cl/5665044
|
|
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5654062
|
|
The practice encourages people to think this is the way to
create a bytes.Buffer when new(bytes.Buffer) or
just var buf bytes.Buffer work fine.
(html/token.go was missing the point altogether.)
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5637043
|