This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

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

  • 8 replies
  • 2 have this problem
  • 3 views
  • Last reply by 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.

All Replies (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.