NewPowerSheller
NewPowerSheller

Reputation: 553

Relative link working in IE but not Chrome

So I have a website at foo.com/vpn/faq.xml which has several links to sub faq pages like foo.com/vpn/faq/pageOne.xml and foo.com/vpn/faq/pageTwo.xml. The .xml files under the faq folder refer to an FAQ.xsl file.

This FAQ.xsl file has the following code:

<div><a href="..\faq.xml"><img alt="" border="0" src="..\images\r_2.gif" align="middle"/><b>FAQ</b></a></div>

This works correctly in internet explorer - it takes the user up one level in the hierarchy back to faq.xml. In chrome, however, it provides as the link "foo.com\vpn\faq..%5Cfaq.xml" rather than jumping up a level in the hierarchy to foo.com\vpn\faq.xml

Is there some change I can make that will make the link work correctly in both ie and chrome? (and hopefully other browsers as well.)

Thanks!

Upvotes: 0

Views: 359

Answers (1)

harpo
harpo

Reputation: 43158

Uri's use forward slashes. Browsers escape certain characters differently, but it's a moot point here because the backslashes are incorrect.

From the spec:

The generic syntax uses the slash ("/"), question mark ("?"), and
number sign ("#") characters to delimit components that are
significant to the generic parser's hierarchical interpretation of an identifier.

Upvotes: 1

Related Questions