oupala/apaxy

links rewritten to //uri when in root level

commonpike opened this issue · 11 comments

If you apply this on a domain root (https://mydomain.com/) the little javascript in footer.html rewrites the links to start with // instead of slash, causing the browser to go to, for example, //README.md, which becomes https://README.md which doesn't exist.

I just disabled that whole javascript for now. I think .. apache is removing the trailing slash already

Otherwise, tis a beauty, thanks!

Nice find. I don't have this in root so I can't test but I can see this getting bad somewhere.

same for me

This issue can be fixed by replacing the anchor href replacement code in footer.html's JS script
(a.href) with the following snippet:

a.href = uri + '/' + a.getAttribute('href',2);

The file is now apaxy.js.

Should we apply the fix?

I'd like to see someone else confirm the bug, and the fix.

@jordanbancino would you kind to test that?

Yeah, no problem. I'll work on it later this week when I have time.

Ok. Here's what I found:

This bug is indeed a problem with my installation. As for the fix, unless I applied it wrong, it does not work. I will clone and install @damianperera's version later this week, as they seem to have fixed it, judging by the commit reference.

There may be a difference between different browsers. Can any of you tell which browser you are using?

Another issue (issue #80) mentioned different behavior between Firefox and Chrome.

I am using Chrome.

Issue #100 and issue #80 are the same.

Both fix are very similar.

The issue is fixed in the development branch a release will soon be published.