diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-19 01:58:01 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-19 01:58:01 +0000 |
commit | daa3ec58dfea5331e57c829303e993159b0478b5 (patch) | |
tree | 80a14d92c17833684886b21512352c828ade7266 /chrome/test/data | |
parent | e1928c97a69d0cb03792e3b6e4c8a14121889f83 (diff) | |
download | chromium_src-daa3ec58dfea5331e57c829303e993159b0478b5.zip chromium_src-daa3ec58dfea5331e57c829303e993159b0478b5.tar.gz chromium_src-daa3ec58dfea5331e57c829303e993159b0478b5.tar.bz2 |
Ensure proper extension when saving an HTML page.
When an HTML page has a title, it is used as the suggested file name in saving
the page. Then the file extension is guessed from the suggested file name.
This results in a wrong extension if the title contains a period ".".
This the source of Bug 10581.
Merely setting ignore_suggested_ext to true in win_util::SaveFileAsWithFilter
is not a good fix, because then we have an issue in saving a page without
a title, where the extension can be correctly derived from the suggested
file name.
This change solves the issue by appending ".htm" to the suggested file name
if the page content type is HTML and the suggested file name doesn't have a
proper extension.
BUG=10581
--------
patch by yuzo@google.com
review here: <http://codereview.chromium.org/115235>
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16355 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data')
-rw-r--r-- | chrome/test/data/save_page/c.htm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/test/data/save_page/c.htm b/chrome/test/data/save_page/c.htm index a7080046..b56ee8e 100644 --- a/chrome/test/data/save_page/c.htm +++ b/chrome/test/data/save_page/c.htm @@ -1,2 +1,2 @@ <title>test.exe</title> -<p>Make sure the saved page is named test.htm.</p>
\ No newline at end of file +<p>Make sure the saved page is named test.exe.htm.</p>
\ No newline at end of file |