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

Unified Diff: net/base/escape.h

Issue 10444117: Escape search terms correctly in the path portion of a custom search engine. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « content/browser/accessibility/browser_accessibility_win.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 139570)
+++ net/base/escape.h (working copy)
@@ -17,8 +17,17 @@
// Escaping --------------------------------------------------------------------
-// Escapes a file. This includes:
+// Escapes characters in text suitable for use as a query parameter value.
+// We %XX everything except alphanumerics and -_.!~*'()
+// Spaces change to "+" unless you pass usePlus=false.
+// This is basically the same as encodeURIComponent in javascript.
+NET_EXPORT std::string EscapeQueryParamValue(const std::string& text,
+ bool use_plus);
+
+// Escapes a partial or complete file/pathname. This includes:
// non-printable, non-7bit, and (including space) "#%:<>?[\]^`{|}
+// For the string16 version, we attempt a conversion to |codepage| before
+// encoding the string. If this conversion fails, we return false.
NET_EXPORT std::string EscapePath(const std::string& path);
// Escapes application/x-www-form-urlencoded content. This includes:
@@ -124,26 +133,6 @@
// &lt; &gt; &amp; &quot; &#39;
NET_EXPORT string16 UnescapeForHTML(const string16& text);
-// Deprecated ------------------------------------------------------------------
-
-// Escapes characters in text suitable for use as a query parameter value.
-// We %XX everything except alphanumerics and -_.!~*'()
-// Spaces change to "+" unless you pass usePlus=false.
-// This is basically the same as encodeURIComponent in javascript.
-// For the string16 version, we do a conversion to charset before encoding the
-// string. If the charset doesn't exist, we return false.
-NET_EXPORT std::string EscapeQueryParamValue(const std::string& text,
- bool use_plus);
-NET_EXPORT bool EscapeQueryParamValue(const string16& text,
- const char* codepage,
- bool use_plus,
- string16* escaped);
-
-// A specialized version of EscapeQueryParamValue for string16s that
-// assumes the codepage is UTF8. This is provided as a convenience.
-NET_EXPORT string16 EscapeQueryParamValueUTF8(const string16& text,
- bool use_plus);
-
namespace internal {
// Private Functions (Exposed for Unit Testing) --------------------------------
« no previous file with comments | « content/browser/accessibility/browser_accessibility_win.cc ('k') | net/base/escape.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698