Page MenuHomePhabricator

Remove mw:ExtLink/URL type and automatically switch between serialization variants
Closed, ResolvedPublic


We currently mark up auto-linked external links (source as mw:ExtLink/URL (see for the spec). There is however no need to distinguish between plain external and auto-linked external URLs on the client side if we automatically convert between the two forms as needed. So we should replace all uses of mw:ExtLink/URL with a plain mw:ExtLink and add some extra info to data-parsoid and cleverness to our serializer.


  • If the target and the link text agree, we can serialize a modified or new link as an URL link in wikitext.
  • If a former URL link's content text is modified by the editor and does not match the target any more, convert to a regular external link.
  • If an unmodified external link *could* be rendered as an URL link, but is marked up as a full external link in the original Wikitext, then preserve this non-minimal serialization on round-trip.

Change detection requires custom shadowing similar to the logic we use for WikiLinks.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:43 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz49484.

Related URL: (Gerrit Change Ifa13f93906f09c6d7d019e6b652d11fa48ca2420)

Note: The above commit was not actually related.

Change 71162 had a related patch set uploaded by GWicke:
Bug 46027: Drop mw:ExtLink/URL

Change 71162 had a related patch set uploaded by GWicke:
Bug 46027, bug 49484: Drop mw:ExtLink/URL

Change 71162 merged by jenkins-bot:
Bug 46027, bug 49484: Drop mw:ExtLink/URL