Page MenuHomePhabricator

Editing redirect hrefs is broken, causes piped link
Closed, ResolvedPublic

Description

Input wikitext:

#REDIRECT [[Foo]]

Output HTML:

<link rel="mw:PageProp/redirect" href="./Foo" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"},"dsr":[0,17,null,null]}'>

Modified HTML (href set to "Bar"):

<link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Foo"},"sa":{"href":"Foo"},"dsr":[0,17,null,null]}'>

Output wikitext:

#REDIRECT [[Bar|Foo]]

The real WTF here is that that actually *works*, it redirects to Bar like it's supposed to.


Version: unspecified
Severity: normal

Details

Reference
bz59674

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:19 AM
bzimport set Reference to bz59674.

I quickly investigated this and it looks like piped links in redirects are supported according to this parser test:

https://git.wikimedia.org/blob/mediawiki%2Fservices%2Fparsoid.git/0b5db8b91bfdeb0a304b372dd8dda123b3fd1ab6/tests%2FparserTests.txt#L5962

I also verified in the WP sandbox that PHP parser also respects it (which is what I suppose you also meant).

So, I guess the expectation is that we dont emit piped links for redirects?

Change 112043 had a related patch set uploaded by Subramanya Sastry:
(Bug 59674) Emit non-piped links for edited redirect links

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

Change 112043 merged by jenkins-bot:
(Bug 59674) Emit non-piped links for edited redirect links

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