Chromium Code Reviews

Unified Diff: net/base/filename_util.cc

Issue 1704163003: FileURLToFilePath: Don't unescape '/' and '\\'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made comment less scary Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « net/base/escape_unittest.cc ('k') | net/base/filename_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/filename_util.cc
diff --git a/net/base/filename_util.cc b/net/base/filename_util.cc
index 0969f7155215884875a69992130e37098ef1db07..153ce43d024882f3d48d62fb1c338930a7d50ee1 100644
--- a/net/base/filename_util.cc
+++ b/net/base/filename_util.cc
@@ -98,7 +98,8 @@ bool FileURLToFilePath(const GURL& url, base::FilePath* file_path) {
// GURL stores strings as percent-encoded 8-bit, this will undo if possible.
path = UnescapeURLComponent(
- path, UnescapeRule::SPACES | UnescapeRule::URL_SPECIAL_CHARS);
+ path, UnescapeRule::SPACES |
+ UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS);
#if defined(OS_WIN)
if (base::IsStringUTF8(path)) {
« no previous file with comments | « net/base/escape_unittest.cc ('k') | net/base/filename_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine