diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 23:50:22 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 23:50:22 +0000 |
commit | f20dac42c398c437ff65c79c9a5610bd8e04af91 (patch) | |
tree | 307ab7f13f413255bda0f0a8d41cbf0ea5a830c2 /net/base/net_util.cc | |
parent | 96354fc5a07b8a41b02989946fbfbcab491a97b6 (diff) | |
download | chromium_src-f20dac42c398c437ff65c79c9a5610bd8e04af91.zip chromium_src-f20dac42c398c437ff65c79c9a5610bd8e04af91.tar.gz chromium_src-f20dac42c398c437ff65c79c9a5610bd8e04af91.tar.bz2 |
I looked at the full dump from the previous crashes and it looks like a testing issue. Hopefully it will be magically unbroken.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_util.cc')
-rw-r--r-- | net/base/net_util.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/base/net_util.cc b/net/base/net_util.cc index 8996182..61b5f87 100644 --- a/net/base/net_util.cc +++ b/net/base/net_util.cc @@ -715,7 +715,7 @@ bool FileURLToFilePath(const GURL& url, std::wstring* file_path) { // GURL stores strings as percent-encoded UTF-8, this will undo if possible. path = UnescapeURLComponent(path, - UnescapeRule::SPACES | UnescapeRule::PERCENTS); + UnescapeRule::SPACES | UnescapeRule::URL_SPECIAL_CHARS); if (!IsStringUTF8(path.c_str())) { // Not UTF-8, assume encoding is native codepage and we're done. We know we @@ -937,9 +937,11 @@ std::wstring GetSuggestedFilename(const GURL& url, TrimString(filename, L".", &filename); } if (filename.empty()) { - if (url.is_valid()) + if (url.is_valid()) { filename = UnescapeAndDecodeUTF8URLComponent( - url.ExtractFileName(), UnescapeRule::SPACES | UnescapeRule::PERCENTS); + url.ExtractFileName(), + UnescapeRule::SPACES | UnescapeRule::URL_SPECIAL_CHARS); + } } // Trim '.' once more. |