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

Issue 5694098: code review 5694098: encoding/json: drop MarshalForHTML; gofix calls to Marshal. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by dsymonds
Modified:
12 years, 1 month ago
Reviewers:
rsc
CC:
golang-dev, r
Visibility:
Public.

Description

encoding/json: drop MarshalForHTML; gofix calls to Marshal. I've elected to omit escaping the output of Marshalers for now. I haven't thought through the implications of that; I suspect that double escaping might be the undoing of that idea. Fixes issue 3127.

Patch Set 1 #

Patch Set 2 : diff -r 581b0fcafe5a https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 581b0fcafe5a https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 72530ac849d0 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -21 lines) Patch
M src/cmd/fix/go1rename.go View 1 1 chunk +6 lines, -0 lines 0 comments Download
M src/cmd/fix/go1rename_test.go View 1 4 chunks +4 lines, -0 lines 0 comments Download
M src/pkg/encoding/json/decode_test.go View 1 1 chunk +0 lines, -10 lines 0 comments Download
M src/pkg/encoding/json/encode.go View 1 1 chunk +0 lines, -11 lines 0 comments Download

Messages

Total messages: 4
dsymonds
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 1 month ago (2012-02-28 00:02:38 UTC) #1
r
LGTM
12 years, 1 month ago (2012-02-28 00:06:54 UTC) #2
dsymonds
*** Submitted as http://code.google.com/p/go/source/detail?r=0e8f0096e631 *** encoding/json: drop MarshalForHTML; gofix calls to Marshal. I've elected to ...
12 years, 1 month ago (2012-02-28 00:41:22 UTC) #3
rsc
12 years, 1 month ago (2012-02-28 16:55:35 UTC) #4
Please send a follow-up CL doing the escaping.
There is no concern about double-escaping, because
the escaping rewrites < > & into sequences that do
not mention those (\u00xx), so escaping twice is
no different than escaping once.

Now that we've removed MarshalForHTML it is
especially important that the escaping be done always.

It would be good to get this in before the weekly is tagged.
Sign in to reply to this message.

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