Mediawiki / Firefox hell

I’m finally fixing up the “White Papers” page on the wiki.

It is, frankly, a descent into hell.

The problem is that the filenames for the white papers are like this;

[Counter] – [Aspnes, Herlihy, Shavit] – Counting Networks.pdf

See those square backets? and the spaces?

It’s like I’ve just tapped directly into every combined neurotic design flaw of Medawiki and Firefox.

Mediawiki can’t have square brackes in URLs, or spaces. Okay, I’ll URL encode. Doesn’t work. Mediakwiki does not recognize a URL encoded string as a URL – not unless it begins with the “http://” – *unencoded*.

Firefox doesn’t recognize either the fully encoded URL, or the bastardized version beginning with “http://”.

It turns out that URL encoding seems to have changed?

Using http://meyerweb.com/eric/tools/dencoder/ gives this;

http%3A%2F%2Fwww.liblfds.org%2Fdownloads%2Fwhite%20papers%2F%5BCounter%5D%20-%20%5BAspnes%2C%20Herlihy%2C%20Shavit%5D%20-%20Counting%20Networks.pdf

It doesn’t work. Paste that into Firefox and it’ll *prepend* “http://” (FOR CHRISTS SAKE DON’T DO THAT) and then tell you it can’t find the server “http%3A%2F%2Fwww.liblfds.org%2Fdownloads%2Fwhite%20papers%2F%5BCounter%5D%20-%20%5BAspnes%2C%20Herlihy%2C%20Shavit%5D%20-%20Counting%20Networks.pdf”. Genius. *facepalm*.

Bastardizing it in the way Medaiwiki requires (unencoded “http://”) makes no difference.

However, I guessed that if I enter the original unencoded URL into Firefox, if I copy’n’pasted from its URL bar I’d get the encoded version – and I do, which is also FACEPALM, because what you’re SEEING is not what you’re GETTING. WRONG.

So Firefox gives me this;

http://www.liblfds.org/downloads/white%20papers/%5BCounter%5D%20-%20%5BAspnes,%20Herlihy,%20Shavit%5D%20-%20Counting%20Networks.pdf

Firefox seems to not encode the path, not encode commas, but does encode square brackets and spaces.

So, like, what the HELL? I thought URL encoding was URL encoding. All the reserved characters became percent encoded and that was it.

So, like, what the hell is going on? Multiple variants of URL encoding? the HELL? if that’s so, can you imagine anything more likely to lead to disaster?

So it’s taken an hour *to get a link working in a mediawiki page*. I’m also wondering if it’ll even work in other browsers. Maybe Firefox has it’s own unique bizzare version of URL encoding.