Page MenuHomePhabricator

Format links with the wiki name in the wikitext output
Closed, ResolvedPublic3 Estimated Story PointsOct 28 2020

Description

Goal

It would be beneficial to have the links linking to the specific wiki where they were generated so once copied out, they can link back to that wiki.
Original user request:

Can the links in the wikitext output be formatted with the name of the wiki as a preface? Example: [[w:en:User:SQL]]. – bradv🍁 19:58, 8 October 2020 (UTC)

Acceptance criteria

Links in the wikitext output contain a prefix for the wiki they are on.

Event Timeline

Niharika created this task.
ARamirez_WMF set the point value for this task to 3.Oct 14 2020, 4:21 PM
ARamirez_WMF changed the subtype of this task from "Task" to "Deadline".

Change 635636 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/CheckUser@master] Ensure user links are parsed as external links in copy feature

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

@Niharika @dbarratt The copy feature sanitizes the HTML before sending it to the parser, rather than re-parsing the wikitext output from the parser - so the cleanest way to do this is to make the user links external links.

@Niharika @dbarratt The copy feature sanitizes the HTML before sending it to the parser, rather than re-parsing the wikitext output from the parser - so the cleanest way to do this is to make the user links external links.

That works.

Change 635636 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Ensure user links are parsed as external links in copy feature

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

dom_walden subscribed.

The Wikitext export now uses external links.

For example:

[http://dev.wiki.local.wmftest.net:8080/wiki/User:Eve <bdi>Eve</bdi>]

And for a user without a user page:

[http://dev.wiki.local.wmftest.net:8080/w/index.php?title=User:New_Admin&action=edit&redlink=1 <bdi>New Admin</bdi>]

Test environment: Local vagrant MediaWiki 1.36.0-alpha (42fcd02), CheckUser 2.5 (6abbe8d).