| 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 @@
|
| // < > & " '
|
| 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) --------------------------------
|
|
|