Page MenuHomePhabricator

<gallery> with |link=<external link> doesn't work on wikis with LanguageConverter
Closed, ResolvedPublic

Details

Reference
bz52190

Related Objects

StatusAssignedTask
OpenNone
OpenNone
OpenNone
StalledNone
OpenNone
StalledNone
Resolvedovasileva
OpenNone
DuplicateNone
OpenABorbaWMF
OpenNone
ResolvedPchelolo
Resolvedmobrovac
ResolvedPchelolo
ResolvedJdforrester-WMF
ResolvedMarkTraceur
ResolvedJdforrester-WMF
Resolvedcscott
OpenNone
OpenNone
OpenNone
OpenNone
Opencscott
OpenNone
Opencscott
Invalid GWicke
Resolvedliangent
Resolvedthiemowmde
OpenNone
Resolvedcscott
Resolvedcscott
Opencscott
Opencscott
Opencscott

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 1:58 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz52190.
bzimport added a subscriber: Unknown Object (MLST).

Change 76341 had a related patch set uploaded by Liangent:
LanguageConverter fixes to eliminate parser test failures

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

cscott added a comment.Aug 8 2013, 9:48 PM

The root cause is that:

<gallery>
File:foobar.jpg|caption|link=http://google.com
</gallery>

is expanded to:
<gallery>
File:foobar.jpg|caption|link=<a rel="nofollow" class="external free" href="http://google.com">-{R|http://google.com}-</a>
</gallery>

and then the embedded | in the link text screws up the caption parsing.

What does -{R|...}- do? It doesn't seem to be documented at https://www.mediawiki.org/wiki/Writing_systems/Syntax

(In reply to comment #2)

The root cause is that:
<gallery>
File:foobar.jpg|caption|link=http://google.com
</gallery>
is expanded to:
<gallery>
File:foobar.jpg|caption|link=<a rel="nofollow" class="external free"
href="http://google.com">-{R|http://google.com}-</a>
</gallery>
and then the embedded | in the link text screws up the caption parsing.
What does -{R|...}- do? It doesn't seem to be documented at
https://www.mediawiki.org/wiki/Writing_systems/Syntax

https://www.mediawiki.org/w/index.php?title=Writing_systems/Syntax&diff=759781&oldid=667003

It's usually used in auto-generated -{ }- tags, in case some text already contains a pipe in it triggering other syntax.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 14 2015, 11:12 PM

Change 76341 had a related patch set uploaded (by Bartosz Dziewoński):
LanguageConverter fixes to eliminate parser test failures

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

Change 311849 had a related patch set uploaded (by C. Scott Ananian):
WIP: protect language converter markup in the preprocessor.

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

Restricted Application added a subscriber: Cosine02. · View Herald TranscriptSep 20 2016, 10:29 PM

Change 76341 merged by jenkins-bot:
Protect -{...}- variant constructs in galleries

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

cscott closed this task as Resolved.Mar 30 2017, 8:34 PM
cscott claimed this task.