diff options
Diffstat (limited to 'net/base/escape.cc')
-rw-r--r-- | net/base/escape.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/base/escape.cc b/net/base/escape.cc index 54174fc..f836afb6 100644 --- a/net/base/escape.cc +++ b/net/base/escape.cc @@ -107,6 +107,10 @@ const char kUrlUnescape[128] = { std::string UnescapeURLImpl(const std::string& escaped_text, UnescapeRule::Type rules) { + // Do not unescape anything, return the |escaped_text| text. + if (rules == UnescapeRule::NONE) + return escaped_text; + // The output of the unescaping is always smaller than the input, so we can // reserve the input size to make sure we have enough buffer and don't have // to allocate in the loop below. |