Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Issue 2903773003: Escape invalid code points (Closed)

Created:
3 years, 7 months ago by sabbakumov
Modified:
3 years, 6 months ago
CC:
chromium-reviews, danakj+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Escape invalid code points Make base::EscapeJSONString() to escape strings like "\xF3\xBF\xBF\xBF" (containing invalid Unicode code points) to be escaped as "\xEF\xBF\xBD". BUG=725778 Review-Url: https://codereview.chromium.org/2903773003 Cr-Commit-Position: refs/heads/master@{#478900} Committed: https://chromium.googlesource.com/chromium/src/+/51d82b24af89da60880835f3032e2d508613f558

Patch Set 1 #

Total comments: 6

Patch Set 2 : Update documentation and signed/unsigned comparison #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -14 lines) Patch
M base/json/string_escape.h View 1 1 chunk +6 lines, -5 lines 0 comments Download
M base/json/string_escape.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M base/json/string_escape_unittest.cc View 1 chunk +8 lines, -8 lines 0 comments Download

Messages

Total messages: 19 (7 generated)
sabbakumov
3 years, 7 months ago (2017-05-24 05:22:00 UTC) #3
Mark Mentovai
https://codereview.chromium.org/2903773003/diff/1/base/json/string_escape.cc File base/json/string_escape.cc (right): https://codereview.chromium.org/2903773003/diff/1/base/json/string_escape.cc#newcode95 base/json/string_escape.cc:95: code_point < 0 || !IsValidCharacter(code_point)) { How can code_point, ...
3 years, 7 months ago (2017-05-24 19:02:48 UTC) #4
sabbakumov
https://codereview.chromium.org/2903773003/diff/1/base/json/string_escape.cc File base/json/string_escape.cc (right): https://codereview.chromium.org/2903773003/diff/1/base/json/string_escape.cc#newcode95 base/json/string_escape.cc:95: code_point < 0 || !IsValidCharacter(code_point)) { On 2017/05/24 19:02:48, ...
3 years, 7 months ago (2017-05-25 03:26:14 UTC) #5
Mark Mentovai
+rsesek I don’t know if this is totally reasonable. Since invalid characters can be unambiguously ...
3 years, 6 months ago (2017-06-01 16:57:46 UTC) #7
Robert Sesek
What's the rationale for this change? There's a linked bug, but it's not clear why ...
3 years, 6 months ago (2017-06-01 17:23:09 UTC) #8
sabbakumov
On 2017/06/01 17:23:09, Robert Sesek wrote: > What's the rationale for this change? There's a ...
3 years, 6 months ago (2017-06-02 02:14:57 UTC) #9
Mark Mentovai
What about making this function return a tri-state value: success invalid Unicode character, losslessly encoded ...
3 years, 6 months ago (2017-06-02 16:42:21 UTC) #10
Robert Sesek
Brett, do you have an opinion on this JSON string handling change? I think this ...
3 years, 6 months ago (2017-06-02 20:21:59 UTC) #12
sabbakumov
brettw@chromium.org: Brett, could you review this CL, please?
3 years, 6 months ago (2017-06-07 01:46:05 UTC) #13
brettw
lgtm
3 years, 6 months ago (2017-06-12 18:01:59 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2903773003/20001
3 years, 6 months ago (2017-06-13 02:56:13 UTC) #16
commit-bot: I haz the power
3 years, 6 months ago (2017-06-13 04:28:30 UTC) #19
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/51d82b24af89da60880835f3032e...

Powered by Google App Engine
This is Rietveld 408576698