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

Unified Diff: components/url_formatter/url_fixer.cc

Issue 1765993002: Remove UnescapeRule::URL_SPECIAL_CHARS from components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to comments Created 4 years, 9 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
« no previous file with comments | « components/signin/core/browser/signin_header_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/url_formatter/url_fixer.cc
diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/url_fixer.cc
index 919a38de36af6aa37a6cba1a796aa1a7a6c2530e..54ff17f168c1d7e4e2ac9647e4831057fb60e1bb 100644
--- a/components/url_formatter/url_fixer.cc
+++ b/components/url_formatter/url_fixer.cc
@@ -620,11 +620,13 @@ GURL FixupRelativeFile(const base::FilePath& base_dir,
#if defined(OS_WIN)
std::wstring unescaped = base::UTF8ToWide(net::UnescapeURLComponent(
base::WideToUTF8(trimmed),
- net::UnescapeRule::SPACES | net::UnescapeRule::URL_SPECIAL_CHARS));
+ net::UnescapeRule::SPACES | net::UnescapeRule::PATH_SEPARATORS |
+ net::UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS));
#elif defined(OS_POSIX)
std::string unescaped = net::UnescapeURLComponent(
trimmed,
- net::UnescapeRule::SPACES | net::UnescapeRule::URL_SPECIAL_CHARS);
+ net::UnescapeRule::SPACES | net::UnescapeRule::PATH_SEPARATORS |
+ net::UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS);
#endif
if (!ValidPathForFile(unescaped, &full_path))
« no previous file with comments | « components/signin/core/browser/signin_header_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698