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

Issue 244056: Add EscapeURL to the ASCII escape methods.... (Closed)

Created:
11 years, 2 months ago by brg
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Add EscapeURL to the ASCII escape methods. EscapeURL escapes all forbidden ascii characters in an URL and replaces spaces with '+'. Test=Escape.EscapeUrl BUG=23029 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27713

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -2 lines) Patch
M chrome/browser/sync/engine/net/url_translator.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/base/escape.h View 1 2 1 chunk +6 lines, -1 line 0 comments Download
M net/base/escape.cc View 1 1 chunk +10 lines, -0 lines 0 comments Download
M net/base/escape_unittest.cc View 4 5 6 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
brg
11 years, 2 months ago (2009-10-01 01:50:44 UTC) #1
tim (not reviewing)
This LGTM because it is taken from internal impl of a similar function that is ...
11 years, 2 months ago (2009-10-01 02:57:53 UTC) #2
tim (not reviewing)
(actually +cc)
11 years, 2 months ago (2009-10-01 02:58:28 UTC) #3
brettw
Is the change description wrong? I don't see it replaces space with a plus.
11 years, 2 months ago (2009-10-01 03:13:17 UTC) #4
brg_google.com
The |true| parameter in the escape method causes space to be replaced with plus. On ...
11 years, 2 months ago (2009-10-01 06:48:55 UTC) #5
brettw
Okay, I get the plus. Can you clarify what this is used for? You have ...
11 years, 2 months ago (2009-10-01 17:16:45 UTC) #6
brg
11 years, 2 months ago (2009-10-01 17:37:42 UTC) #7
Some confusion is obviously coming from the name, which is poorly chosen.

The purpose of the method is to enocde data which is transmitted in
the applicaiton/x-www-urlencoded content type as specified here:
http://www.w3.org/TR/html401/interact/forms.html#form-content-type.
Specifically, it is what sync had used during development and is
required for decoding properly.

Perhaps its name should EscapeUrlencodedData instead of EscapeUrl.  I
will also add the first sentence of explanation above as a comment.

On Thu, Oct 1, 2009 at 10:16 AM,  <brettw@chromium.org> wrote:
>
> Okay, I get the plus.
>
> Can you clarify what this is used for? You have a URL, and now you need to
> escape it for what purpose. Escaping #, ?, &, and % will actually corrupt
> the
> URL and you won't be able to use it anymore.
>
> http://codereview.chromium.org/244056
>

Powered by Google App Engine
This is Rietveld 408576698