Page MenuHomePhabricator

URL encoding for external interwikis can create non-working links
Open, Needs TriagePublic

Description

Example 1
Wikitext:

[[iarchive:americanyachting00step?q{{=}}"william+capes"]]

Expected outcome: (working link)

https://archive.org/details/americanyachting00step?q="william+capes"

Actual outcome: (broken link)

https://archive.org/details/americanyachting00step%3Fq%3D%22william%2Bcapes%22

Example 2
Wikitext:

[[sourceforge:projects/jnechaevsky/files/Russian Doom/2.2/russian-doom-2.2-win32.zip/download|bar]]

Expected outcome: (working link)

https://sourceforge.net/projects/jnechaevsky/files/Russian%20Doom/2.2/russian-doom-2.2-win32.zip/download

Actual outcome: (broken link)

https://sourceforge.net/projects/jnechaevsky/files/Russian_Doom/2.2/russian-doom-2.2-win32.zip/download

We seem to assume that the target is a wiki, therefore somewhat forgiving with punctuation and spaces. Obviously that's not always true, and by the time a bot catches the error, the original contributor might not be around to explain. There could even be i18n implications when linking to non-English sites.

(Tangent: there's no good reason for the editor to have to use {{=}}; it should be obvious to the parser that no template is being called, so the equals sign can't be a parameter assignment. Separate issue.)

T180511 may be related under the hood, though VE wasn't involved here.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Aklapper renamed this task from Smarter encoding for external interwikis to URL encoding for external interwikis can create non-working links.Feb 16 2018, 6:45 PM