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

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: Add test Created 4 years, 10 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
Index: net/base/filename_util.cc
diff --git a/net/base/filename_util.cc b/net/base/filename_util.cc
index 0969f7155215884875a69992130e37098ef1db07..341e647d502467fc80e5d68254d8193c733ce791 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_SEPERATORS);
#if defined(OS_WIN)
if (base::IsStringUTF8(path)) {

Powered by Google App Engine
This is Rietveld 408576698