Index: net/base/escape.cc |
diff --git a/net/base/escape.cc b/net/base/escape.cc |
index 15de5e1dbd37d1720eec25cab678654c95c98777..fc7d5cf0fc8c4b0293b2399138ab87175c31c6f8 100644 |
--- a/net/base/escape.cc |
+++ b/net/base/escape.cc |
@@ -290,7 +290,10 @@ STR UnescapeURLWithAdjustmentsImpl( |
(first_byte == ' ' && (rules & UnescapeRule::SPACES)) || |
// 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 == '\\') && |
+ (rules & UnescapeRule::PATH_SEPARATORS)) || |
+ (first_byte > ' ' && first_byte != '/' && first_byte != '\\' && |
+ (rules & UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS)) || |
// Additionally allow non-display characters if requested. |
(first_byte < ' ' && |
(rules & UnescapeRule::SPOOFING_AND_CONTROL_CHARS)))) { |