Closed Biserkov closed 7 years ago
Interesting. This is a long known bug, as you said due to the way that browsers interpret .
. Technically according to the URL encoding spec, .
urlencodes to itself, so the tactic of urlencoding to work around this is browser dependent. IIRC on Firefox where I originally implemented the %2E
hack it worked, Chrome and other browsers aren't quite so happy with this workaround.
Way back when I solved this particular problem by munging .
to _DOT_
and ?
to _QMARK_
along with some other such changes. This is all visible in the lib-grimoire repo's history, and there are remains of it in the upgrade-munge
code.
I honestly don't remember what all would be required to make this work, although I'm sure there are a couple more or less hacky implementations possible. I'll take a look today.
Okay. So I started looking into this.... it looks like I was relying on spec-unsupported behavior. There's gonna have to be some other munging strategy here. Probably the best thing to do is to just bring the old augmented clojure.core/munge
back from the reflog. Sigh.
I have a working patch for this locally. Will try and get it finished/deployed today.
Cool!
From: Reid D McKenzie Sent: 05 декември 2016 г. 19:14 To: clojure-grimoire/grimoire Cc: Jordan Biserkov; Author Subject: Re: [clojure-grimoire/grimoire] The .. macro docs are inaccessible(#241)
I have a working patch for this locally. Will try and get it finished/deployed today. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Well the last patch got part of the way there
clojure.core/. clojure.core/..
but the generated links on the cheatsheet page are still hosed for some reason. More debugging work required there.
There we go. The link to ..
in the cheatsheet works against the live site, as does searching for .
or ..
:smile:
I looked around, but couldn't find where the magic actually happens. If someone can point me in the right direction I'm willing to make a PR.
Cause:
Browsers interpret the .. at the end of the URL as a relative URL which points to the parent directory.
becomes
Suggested workaround:
ClojureDocs fixes this by adding an underscore: