interwiki links with spaces are parsed as interlanguage links
Closed, ResolvedPublic

Description

Spaces in the interwiki link can make it into interlanguage link. For example [[:en:ox|ox]] is a proper inline interwiki link, with word "ox" linking to wikipedia article, but [[ :en :ox|ox]] (with spaces) does not show in the text, but rather shows up as a interlanguage link in the side bar on the left.

Jarekt created this task.Mar 8 2016, 1:07 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 8 2016, 1:07 PM
Restricted Application added a subscriber: Steinsplitter. · View Herald TranscriptMar 8 2016, 1:09 PM
Jarekt added a comment.Mar 8 2016, 1:13 PM

I just tried:

  • [[ :en :ox|ox]]
  • [[:en:ox|ox]]

on English wikipedia and it was parsed correctly (the same way), but Commons, Polish Wikipedia and Wikidata parses them differently. So maybe it is just the matter for all the project to use the same Wiki text parser as English Wikipedia.

Jarekt edited projects, added MediaWiki-Parser; removed Commons.Mar 8 2016, 1:14 PM
TTO added a subscriber: TTO.Mar 26 2016, 9:45 PM

Can you narrow it down? Which of the two spaces causes the problem? Or does it require both to be there?

Aklapper triaged this task as Low priority.May 31 2016, 8:16 AM

@Jarekt: Can you answer TTO's last questions please?

I just tried
[[ :en :ox|ox]]
[[ :pl:ul|ul]]
[[:de :der|der]]

on Commons and on English and Polish Wikipedia and the first 2 parsed correctly, but the 3rd one did not. So it looks like 2 spaces option works fine now but the second space option is still wrong.

TTO added a comment.Dec 27 2016, 5:52 AM

This is an issue with images as well: https://test.wikipedia.org/wiki/T129218

It's hard to believe this bug hasn't already been reported at some point in the last 12 years, but if it has, I can't find it.

Change 329321 had a related patch set uploaded (by TTO):
Parser: Trim leading whitespace from links before checking for leading :

https://gerrit.wikimedia.org/r/329321

Umherirrender closed this task as Resolved.Jan 21 2017, 11:55 PM

Change 329321 merged by jenkins-bot:
Parser: Trim leading whitespace from links before checking for leading :

https://gerrit.wikimedia.org/r/329321