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

Does anyone know how to fix firefoxes issue of not opening href links correctly?

more options

When I click on certain links on our intranet, firefox will automatically add content to the href url address and the link will fail.

The link works in other browser like IE11 and chrome just fine, but some of our users use firefox so I am needing to find a fix.

I already did a clean install of firefox and the issue still arises.

When I click on certain links on our intranet, firefox will automatically add content to the href url address and the link will fail. The link works in other browser like IE11 and chrome just fine, but some of our users use firefox so I am needing to find a fix. I already did a clean install of firefox and the issue still arises.

All Replies (7)

more options

Please post some of these links.

What is your computer system and Firefox?

Start Firefox in Safe Mode {web Link} by holding down the <Shift>
(Mac=Options)
key, and then starting Firefox. Is the problem still there?

more options

bgalloway said

When I click on certain links on our intranet, firefox will automatically add content to the href url address and the link will fail.

This is a mysterious description. What is added??

I'll hazard a guess: Do the links contain any backslashes? Unlike some other browsers which treat those the same as forward slashes, Firefox will URL encode them to %5C which naturally would cause problems if they are meant to be understood as separators in a path.

Modified by jscher2000 - Support Volunteer

more options

You can right-click and select "Inspect Element" to open the Inspector ("3-bar" menu button or Tools > Web Developer) with this element selected to check the link code.

more options

Just a comment. No need to divulge confidential information here. Please note this is a public forum, and is partialy indexed by search engines. Change names if necessary. Try to give the shortest possible examples and say how they compare in Firefox and in IE and of course what is getting added by Firefox.

Presumably you know exactly what the href is and you know the location of the page containing that href and the target location.

This article

Lists some paths using generic wording.

I am wondering if this is just say a couple of Windows laptops and a printer at Home or is this a small office based LAN or something much bigger.

more options

For example:

\server\folder\file.txt

Becomes

/site/page/\server\folder\file.txt

It works on IE and chrome, but Firefox changes it and errors out.

more options

Yes, backslashes are not valid in URLs in Firefox.

I don't suppose you would want to clean up all the pages on the site?

This extension used to do the job for Firefox users, but recent reviews look troubling: https://addons.mozilla.org/firefox/addon/slashy/

Alternately, someone probably could come up with JavaScript function you could add to the site to fix the links in real time.

more options

Maybe something like this:

function fixBackslashhrefs(){ if (document.querySelectorAll){ var ahrefs = document.querySelectorAll('a[href]'); for (var i=0; i<ahrefs.length; i++) if(ahrefs[i].getAttribute("href").indexOf("\\") > -1) ahrefs[i].setAttribute("href", "file:///" + ahrefs[i].getAttribute("href").replace(/\\/g, "\/")); } } window.setTimeout(fixBackslashhrefs, 1000);