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

Issue 11975043: code review 11975043: encoding/xml: Do not pass through invalid utf8 bytes

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by axaxs
Modified:
11 years, 11 months ago
Reviewers:
adg
CC:
golang-dev, r, bradfitz, adg
Visibility:
Public.

Description

encoding/xml: Do not pass through invalid utf8 bytes EscapeText now escapes 0xFFFD returned from DecodeRune as 0xFFFD, rather than passing through the original byte. Fixes issue 5880.

Patch Set 1 #

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

Patch Set 3 : diff -r 71b918d9078e https://code.google.com/p/go #

Total comments: 2

Patch Set 4 : diff -r 71b918d9078e https://code.google.com/p/go #

Patch Set 5 : diff -r 71b918d9078e https://code.google.com/p/go #

Patch Set 6 : diff -r 71b918d9078e https://code.google.com/p/go #

Patch Set 7 : diff -r 71b918d9078e https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -1 line) Patch
M src/pkg/encoding/xml/xml.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/encoding/xml/xml_test.go View 1 2 3 4 5 6 2 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 16
axaxs
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
11 years, 11 months ago (2013-07-28 00:45:41 UTC) #1
r
https://codereview.appspot.com/11975043/diff/6001/src/pkg/encoding/xml/xml.go File src/pkg/encoding/xml/xml.go (right): https://codereview.appspot.com/11975043/diff/6001/src/pkg/encoding/xml/xml.go#newcode1761 src/pkg/encoding/xml/xml.go:1761: if !isInCharacterRange(r) || r == 0xFFFD { U+FFFD is ...
11 years, 11 months ago (2013-07-28 22:02:21 UTC) #2
r
https://codereview.appspot.com/11975043/diff/6001/src/pkg/encoding/xml/xml.go File src/pkg/encoding/xml/xml.go (right): https://codereview.appspot.com/11975043/diff/6001/src/pkg/encoding/xml/xml.go#newcode1763 src/pkg/encoding/xml/xml.go:1763: break ah i see, the break is important. still, ...
11 years, 11 months ago (2013-07-28 22:03:56 UTC) #3
bradfitz
No test? On Jul 28, 2013 1:16 AM, <alex@lx.lc> wrote: > Reviewers: golang-dev1, > > ...
11 years, 11 months ago (2013-07-28 22:13:57 UTC) #4
axaxs
Hello, @Brad - This is my first attempt at submitting a change, apologies if I'm ...
11 years, 11 months ago (2013-07-29 02:23:36 UTC) #5
adg
The test case is essentially there in the issue description. Here it is as a ...
11 years, 11 months ago (2013-07-29 02:31:40 UTC) #6
axaxs
ADG, Thank you for advice. I'm sorry to come across as dense but would like ...
11 years, 11 months ago (2013-07-29 02:36:04 UTC) #7
adg
On 29 July 2013 12:36, Alex Skinner <alex@lx.lc> wrote: > Thank you for advice. I'm ...
11 years, 11 months ago (2013-07-29 02:39:31 UTC) #8
axaxs
Thank you very much, Andrew. I've resubmitted xml_test.go with properly formatted testcase provided, and verified ...
11 years, 11 months ago (2013-07-29 03:07:56 UTC) #9
r
looks good to me. leaving for adg.
11 years, 11 months ago (2013-07-30 01:48:02 UTC) #10
r
please edit the CL description to start encoding/xml: rather than just xml:
11 years, 11 months ago (2013-07-30 01:48:30 UTC) #11
axaxs
On 2013/07/30 01:48:30, r wrote: > please edit the CL description to start > > ...
11 years, 11 months ago (2013-07-30 01:59:33 UTC) #12
adg
LGTM Have you signed the CLA? http://golang.org/s/cla
11 years, 11 months ago (2013-07-30 03:33:18 UTC) #13
axaxs
Thank you for the link. I've just signed the individual CLA. Alex On Mon, Jul ...
11 years, 11 months ago (2013-07-30 04:05:42 UTC) #14
adg
*** Submitted as https://code.google.com/p/go/source/detail?r=986281309b3e *** encoding/xml: Do not pass through invalid utf8 bytes EscapeText now ...
11 years, 11 months ago (2013-07-30 04:11:54 UTC) #15
adg
11 years, 11 months ago (2013-07-30 04:13:35 UTC) #16
Thanks for the fix! :-)
Sign in to reply to this message.

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