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

Unified Diff: net/base/escape.cc

Issue 1704163003: FileURLToFilePath: Don't unescape '/' and '\\'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo 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/escape.cc
diff --git a/net/base/escape.cc b/net/base/escape.cc
index 15de5e1dbd37d1720eec25cab678654c95c98777..1a1b7357e17fb7cf3809e461f4d9924ed307af15 100644
--- a/net/base/escape.cc
+++ b/net/base/escape.cc
@@ -291,6 +291,8 @@ STR UnescapeURLWithAdjustmentsImpl(
// Allow any of the prohibited but non-control characters when
// we're doing "special" chars.
(first_byte > ' ' && (rules & UnescapeRule::URL_SPECIAL_CHARS)) ||
+ (first_byte > ' ' && first_byte != '/' && first_byte != '\\' &&
+ (rules & UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPERATORS)) ||
// Additionally allow non-display characters if requested.
(first_byte < ' ' &&
(rules & UnescapeRule::SPOOFING_AND_CONTROL_CHARS)))) {

Powered by Google App Engine
This is Rietveld 408576698