Page MenuHomePhabricator

Parsoid wrong "red" wikilink handling in <gallery>
Closed, DuplicatePublic

Description

The Parsoid does not give the correct HTML/RDF output by parsing a <gallery> media description, if this one includes a "red" wikilink.

For example, this wikitext:
<gallery>
File:View from connors hill panorama.jpg|[[Tagada Tagada]]
</gallery>

generates this:
<a href="/w/index.php?title=Tagada_Tagada&amp;action=edit&amp;redlink=1" class="new" title="Tagada Tagada (page does not exist)" data-parsoid="{}">Tagada Tagada</a>

...and it should generate something like this (output of "[[Tagada Tagada]]"):
<a rel="mw:WikiLink" href="./Tagada_Tagada" data-parsoid='{"stx":"simple","a":{"href":"./Tagada_Tagada"},"sa":{"href":"Tagada Tagada"},"dsr":[11,28,2,2]}'>Tagada Tagada</a>

At least, the <a> "href" attribute is wrong.


Version: unspecified
Severity: enhancement

Details

Reference
bz60340

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:56 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz60340.

We currently call out to the PHP gallery extension, which delivers the red link.

Wikia is working on a port of the gallery extension to Parsoid, which will use Parsoid HTML for gallery contents too. I'm hoping that they are soon contributing this code back.

Arlolra set Security to None.