Page MenuHomePhabricator

Typeof cleanup and smart serialization of new language and interwiki links
Closed, ResolvedPublic

Description

These currently serialize as external links:

echo '<link rel="mw:WikiLink/Language" href="http://ko.wikipedia.org/wiki/">' | node parse --html2wt
[[http://ko.wikipedia.org/wiki/]]

echo '<a rel="mw:WikiLink/Interwiki" href="http://ko.wikipedia.org/wiki/">ko:</a>' | node parse --html2wt
[[http://ko.wikipedia.org/wiki/|ko:]]

We should probably match absolute URLs against the list of patterns and serialize to the locally defined interwiki / language prefix when that is defined.

Details

Reference
bz53432

Related Objects

StatusAssignedTask
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
DeclinedNone
ResolvedCatrope
ResolvedSbailey
DeclinedNone
OpenNone
Resolved GWicke
Resolvedssastry
ResolvedNone
OpenNone
ResolvedCatrope
Resolved GWicke

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:55 AM
bzimport added a project: Parsoid-Serializer.
bzimport set Reference to bz53432.

https://gerrit.wikimedia.org/r/#/c/81413/ adds tests for this. The html2* portion is currently failing and blacklisted.

DOM spec change plans after some discussion on IRC:

  1. mw:WikiLink/Interwiki becomes mw:ExtLink/Interwiki, and we'll automatically detect interwiki prefixes in new/modified mw:ExtLink content.
  1. mw:WikiLink/Category becomes mw:PageProp/Category as these are not really links. They don't render at all in the page, don't accept a caption etc.
  1. mw:WikiLink/Language becomes mw:PageProp/Language - same as with categories.

We should also revisit the various mw:ExtLink/* variants. Some of them are very syntax-focused without adding real information for external users.

Change 81599 had a related patch set uploaded by Catrope:
Add dual detection for types that Parsoid is about to rename

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

Change 81599 merged by jenkins-bot:
Add dual detection for types that Parsoid is about to rename

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

(In reply to comment #4)

Change 81599 merged by jenkins-bot:
Add dual detection for types that Parsoid is about to rename
https://gerrit.wikimedia.org/r/81599

VE support will be in wmf15 (so deployed on MediaWiki.org tomorrow, and everywhere on 5 September.

In bug 53505 I developed a method for pure-CSS external link numbering ([http://example.com]), so we can also go ahead and simplify all mw:ExtLink/* variants to just mw:ExtLink, and remove the numbering logic in Parsoid. That means that current mw:WikiLink/Interwiki will go straight to mw:ExtLink.

Change 84871 had a related patch set uploaded by GWicke:
WIP Bug 53432: DOM spec cleanup

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

Change 84871 merged by jenkins-bot:
Bug 53432: DOM spec cleanup

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

This has now landed, but is not yet deployed in production. Will probably go live next week.

Krinkle updated the task description. (Show Details)Jun 29 2016, 3:30 PM
Krinkle set Security to None.
Restricted Application added a subscriber: revi. · View Herald TranscriptJun 29 2016, 3:30 PM