Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2002)

Issue 13468045: code review 13468045: text/template: catch unmatched right delimiter (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by r
Modified:
11 years, 7 months ago
Reviewers:
dsymonds, tegoor
CC:
golang-dev, dsymonds
Visibility:
Public.

Description

text/template: catch unmatched right delimiter It was simply a missing error case: when scanning plain text outside of an action, a right delimiter should be an error.

Patch Set 1 #

Patch Set 2 : diff -r dee2701c645c https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -1 line) Patch
M src/pkg/text/template/parse/lex.go View 1 chunk +4 lines, -0 lines 0 comments Download
M src/pkg/text/template/parse/lex_test.go View 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/text/template/parse/parse_test.go View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 8 months ago (2013-09-12 03:12:56 UTC) #1
dsymonds
LGTM
11 years, 8 months ago (2013-09-12 03:16:38 UTC) #2
r
*** Submitted as https://code.google.com/p/go/source/detail?r=f6ccb434acdd *** text/template: catch unmatched right delimiter It was simply a missing ...
11 years, 8 months ago (2013-09-12 03:23:07 UTC) #3
tegoor_gmail.com
This causes a lot of code is not compatible. On Thursday, September 12, 2013 11:23:07 ...
11 years, 7 months ago (2013-09-12 12:29:25 UTC) #4
r
Can you be more specific? -rob
11 years, 7 months ago (2013-09-12 12:34:51 UTC) #5
tegoor_gmail.com
When the template content include some minified javascript, the error always appears. On Thursday, September ...
11 years, 7 months ago (2013-09-12 12:56:58 UTC) #6
dsymonds
If you are writing JavaScript directly into a template then you're going to get all ...
11 years, 7 months ago (2013-09-12 13:11:52 UTC) #7
r
11 years, 7 months ago (2013-09-12 22:13:58 UTC) #8
If minified JS can produce }} surely it can also produce {{. I agree
with David, this sounds scary. Use safe delimiters.

However, I will consider rolling back this change if a convincing case
can be made. It is a breaking change.

-rob
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b