Page MenuHomePhabricator

[bug] VE/Parsoid mangled interwiki link
Closed, DuplicatePublic


I pasted the following text into Visual Editor's Add a link box (Wikipedia tab) –
w:fr:Wikipédia:Le Bistro/2 juillet 2020#[annonce] Nouvelles fonctionnalités pour l’interface Vector

Observed behaviour
On save/publish, the leading w: was stripped from link, changing it from an interwiki link to an interlanguage link (it disappeared from the body text and created a “Français” item in the sidebar). The wikilink was URL-encoded and the unencoded piped display text was added (note the leading “w:” in the display text).
[[fr:Wikipédia:Le Bistro/2 juillet 2020#%5Bannonce%5D%20Nouvelles%20fonctionnalit%C3%A9s%20pour%20l%E2%80%99interface%20Vector|w:fr:Wikipédia:Le Bistro/2 juillet 2020#[annonce] Nouvelles fonctionnalités pour l’interface Vector]]

Expected behaviour
Retain interwiki prefixes. Only percent-encode characters that are not allowed in wikilinks (%5B and %5D). The following works fine without piping:
[[w:fr:Wikipédia:Le Bistro/2 juillet 2020#%5Bannonce%5D Nouvelles fonctionnalités pour l’interface Vector]]

Site: English Wikipedia, desktop web
Platform: iOS 12 Safari
Reproducibility (same/other site–platform combinations): not tested
Round-tripping through Visual–Source–Visual: not tested
What happens if you use a leading colon (:fr: rather than w:fr:)? not tested
What happens if you enter the text into the editing area, select it, then use the link button to wikilink it? Unknown, but suspect it would produce the same output.
Existing/duplicate reports: haven’t searched

[Please feel free to change the underlined text to proper headings or otherwise reformat, if you have a standard/preferred layout.]

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

There are three sub-issues here:

  1. Stripping interwiki prefix.
  2. Unnecessary percent-encoding. Is that what you get for editing with HTML DOM? Can some trick markup be inserted like what is done to round-trip certain wikicode?
  3. Unnecessary piping. May be required for VE to WYSIWYG. It’s a disservice to those who prefer clean source, but what could be done?
ssastry triaged this task as Medium priority.Jul 22 2020, 4:12 PM
ssastry added a project: Parsoid-Serializer.
ssastry moved this task from Needs Triage to Bugs & Crashers on the Parsoid board.