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

Unified Diff: net/base/escape.h

Issue 56053: URL's not properly unescaping when displayed (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/shelf_item_dialog.cc ('k') | net/base/escape.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/escape.h
===================================================================
--- net/base/escape.h (revision 17365)
+++ net/base/escape.h (working copy)
@@ -41,32 +41,36 @@
typedef uint32 Type;
enum {
+ // Don't unescape anything at all.
+ NONE = 0,
+
// Don't unescape anything special, but all normal unescaping will happen.
// This is a placeholder and can't be combined with other flags (since it's
- // just the absense of them). Things like escaped letters, digits, and most
- // symbols will get unescaped with this mode.
- NORMAL = 0,
+ // just the absence of them). All other unescape rules imply "normal" in
+ // addition to their special meaning. Things like escaped letters, digits,
+ // and most symbols will get unescaped with this mode.
+ NORMAL = 1,
// Convert %20 to spaces. In some places where we're showing URLs, we may
// want this. In places where the URL may be copied and pasted out, then
// you wouldn't want this since it might not be interpreted in one piece
// by other applications.
- SPACES = 1,
+ SPACES = 2,
// Unescapes various characters that will change the meaning of URLs,
- // including '%', '+', '&', '/', '#'. If we unescaped these charaters, the
+ // including '%', '+', '&', '/', '#'. If we unescaped these characters, the
// resulting URL won't be the same as the source one. This flag is used when
// generating final output like filenames for URLs where we won't be
// interpreting as a URL and want to do as much unescaping as possible.
- URL_SPECIAL_CHARS = 2,
+ URL_SPECIAL_CHARS = 4,
- // Unescapes control characters such as %01. This INCLUDES NULLs!. This is
+ // Unescapes control characters such as %01. This INCLUDES NULLs. This is
// used for rare cases such as data: URL decoding where the result is binary
// data. You should not use this for normal URLs!
- CONTROL_CHARS = 4,
+ CONTROL_CHARS = 8,
// URL queries use "+" for space. This flag controls that replacement.
- REPLACE_PLUS_WITH_SPACE = 8,
+ REPLACE_PLUS_WITH_SPACE = 16,
};
};
« no previous file with comments | « chrome/browser/views/shelf_item_dialog.cc ('k') | net/base/escape.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698