Chromium Code Reviews| Index: chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc |
| diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc b/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc |
| index c2e42c027b1dde32c3f5c8d71eb231faf9493a4c..856a6ef207896500d4c29a64b0be4364ebe3e8ac 100644 |
| --- a/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc |
| +++ b/chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc |
| @@ -227,7 +227,11 @@ void TabContentsDragWin::PrepareDragForFileContents( |
| // synthesize one from the provided extension and URL. |
| FilePath file_name(drop_data.file_description_filename); |
| file_name = file_name.BaseName().RemoveExtension(); |
| - if (file_name.value().empty()) { |
| + |
| + // If file_name contains percent-encoded characters, we want to decoded |
| + // them to provide friendly file name for international users. |
| + if (file_name.value().empty() || |
| + file_name.value().find('%') != std::string::npos) { |
|
sky
2011/09/06 15:55:05
If the file name contains a '%' and you enter this
|
| // Retrieve the name from the URL. |
| file_name = FilePath( |
| net::GetSuggestedFilename(drop_data.url, "", "", "", "", string16())); |