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

Unified Diff: net/base/escape.cc

Issue 244056: Add EscapeURL to the ASCII escape methods.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « net/base/escape.h ('k') | net/base/escape_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/escape.cc
===================================================================
--- net/base/escape.cc (revision 27534)
+++ net/base/escape.cc (working copy)
@@ -186,6 +186,16 @@
return Escape(path, kPathCharmap, false);
}
+// non-printable, non-7bit, and (including space) ?>=<;+'&%$#"![\]^`{|}
+static const Charmap kUrlEscape(
+ 0xffffffffL, 0xf80008fdL, 0x78000001L, 0xb8000001L,
+ 0xffffffffL, 0xffffffffL, 0xffffffffL, 0xffffffffL
+);
+
+std::string EscapeUrl(const std::string& path) {
+ return Escape(path, kUrlEscape, true);
+}
+
// non-7bit
static const Charmap kNonASCIICharmap(
0x00000000L, 0x00000000L, 0x00000000L, 0x00000000L,
« no previous file with comments | « net/base/escape.h ('k') | net/base/escape_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698