搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

href="/virtual\subdir\FILE.PDF" messes up file name upon download. Does not correctly parse the backslashes.

  • 8 个回答
  • 2 人有此问题
  • 3 次查看
  • 最后回复者为 cor-el

more options

If you have backslashes in an href like this: href="/virtualdir\subdir\FILE.PDF" ... and you follow the hyperlink, upon download (save link as) Firefox names the file as SUBDIR_FILE.PDF instead of leaving file name as FILE.PDF.

If you have backslashes in an href like this: href="/virtualdir\subdir\FILE.PDF" ... and you follow the hyperlink, upon download (save link as) Firefox names the file as SUBDIR_FILE.PDF instead of leaving file name as FILE.PDF.

所有回复 (8)

more options

if you think its bug, file a bug

more options

There should never be backslashes in the URL as Firefox treats those as part of the file name (%5C) and not as path separators and invalid characters get converted to underline characters.

more options

Thanks very much for the explanation. Sorry, I know I'm going to sound stubborn, but I need to ask... Since backslashes are a standardized and long-standing delimiter for designating a file path, why doesn't Firefox treat them that way, rather than deciding it's part of the filename? The Web server handles the syntax fine, the problem only seems to be on the browser side... And so far I've only encountered it with Firefox. Not with IE.

more options

IE and probably Google Chrome as well tend to be more forgiving with such coding errors, but Firefox is usually more strict and doesn't allow this. A valid path should consist of names separated by slashes and not by backslashes.

more options

Sorry, cant find a thread that fits,

Prob. is:  Download filenames are Cut Short - ie: Filenam~rt.mov  .  This is recent 12/13,  and extremely irritating, looking to downgrade FF
more options

Hi Nighthawk.rl, you're right, that doesn't fit here. Please start a new question with your system details. You can start a new question at the following link. Scroll down past the suggestions to continue with the form (I think it has 3 different screens). https://support.mozilla.org/en-US/questions/new/desktop/fix-problems

Also, if this is a file saved by a video downloader, check for updates and check for support news on the add-on. Due to the changes related to downloads in Firefox 26, many add-ons have been updated in the past few weeks.

more options

Hi edactic, in the days before Firefox, many sites used backslashes because the developers were Windows people and IE was dominant. So... about ten years ago, someone created an extension to work around it: https://addons.mozilla.org/en-US/firefox/addon/slashy/

more options

You can look at this version of Slashy that I've modified to work in more cases.

You can download this Firefox extension file by clicking the "Download This File" button without having to register and sign on to this website.