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

Unified Diff: net/base/escape.h

Issue 632843003: Add a function to escape a query part of url (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Follow RFC 2396 to escape a query part of url Created 6 years, 2 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 | « no previous file | 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
diff --git a/net/base/escape.h b/net/base/escape.h
index 1915d24418883a2186ffc329733a93bc43938085..444f4336e9ecc9a3dfdc955fe8eafc6009b74010 100644
--- a/net/base/escape.h
+++ b/net/base/escape.h
@@ -54,6 +54,11 @@ NET_EXPORT void AppendEscapedCharForHTML(char c, std::string* output);
NET_EXPORT std::string EscapeForHTML(const std::string& text);
NET_EXPORT base::string16 EscapeForHTML(const base::string16& text);
+// Escapes characters in text suitable for use as a query part.
+// We %XX everything except alphanumerics, the restricted chracters(;/?:@&=+$,),
+// the mark characters(-_.!~*'()).
asanka 2014/10/10 20:59:16 You are once again going to be bitten by https://u
+NET_EXPORT std::string EscapeQueryPart(const std::string& text);
+
// Unescaping ------------------------------------------------------------------
class UnescapeRule {
« no previous file with comments | « no previous file | net/base/escape.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698