Page MenuHomePhabricator

HTML-escaped characters in enclosed URL links are double escaped
Closed, ResolvedPublic

Description

Author: contactbox

Description:
Links on a current Wikipedia ArbCom page such as:

OLD LINKS, USED TO WORK, NOW FAILS:
http://en.wikipedia.org/w/wiki.phtml?
title=Talk:Zoophilia&diff=6946799&oldid=6946719

http://en.wikipedia.org/w/wiki.phtml?
title=Special:Contributions&hideminor=0&target=24.61.31.36&lim
it=1000&offset=0

CURRENT LINKS, WORK CORRECTLY:
http://en.wikipedia.org/w/wiki.phtml?
title=Talk:Zoophilia&diff=6946799&oldid=6946719

http://en.wikipedia.org/w/index.php?
title=Special:Contributions&hideminor=0&namespace=&target=24.61.31.36&limi
t=2000&offset=0

which worked up until recently, now do not work. Replacement of & by
& fixes it. Whilst it makes sense as a fix, this also breaks many old
links which now will not succeed. Probably due to upgrade to 1.4 fork.

Solutions?

  1. Send a bot out to convert all relevant links with & in the URL to

the correct character

  1. re-modify the mediawiki code to allow the old (less correct) form.

Version: unspecified
Severity: normal
URL: http://meta.wikimedia.org/wiki/Sandbox/1228

Details

Reference
bz1228

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:07 PM
bzimport set Reference to bz1228.
bzimport added a subscriber: Unknown Object (MLST).

I believe the "&" was a bug. Probably dont want to reimplement it :(

contactbox wrote:

That makes sense. The problem is, there are now links within WP that used it and
now no longer work.

Since it almost certainly was unintended, and it is quite sensible to remove the
behaviour, perhaps a bot that goes through WP cur and history, and replaces internal
links containing "&" with "&", would be a good way to fix that problem?

The links with & in the original text work as expected when inserted directly in
text, but get double-escaped in [http:...] enclosed links. This was probably caused by
an incorrect fix for completely unescaped links.

Bug now fixed. Affected pages should be ?action=purge'd to rebuild parser cache.