Page MenuHomePhabricator

External links with & in them break in an imagemap
Closed, ResolvedPublic

Description

Author: Prodego

Description:
Using imagemap to link to an external URL with '&' in it will break, the & is converted to &. (that is &amp ; in case it renders it) So a link to www.&.com will go to www.&.com (again &amp ;).


Version: unspecified
Severity: normal
URL: http://www.mediawiki.org/wiki/Extension:ImageMap/bug_11504

Details

Reference
bz11504

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:56 PM
bzimport added a project: ImageMap.
bzimport set Reference to bz11504.
bzimport added a subscriber: Unknown Object (MLST).

www.&.com is not a valid domain.

Prodego wrote:

However, something like "en.wikipedia.org/w/index.php?title=Main_Page&action=edit" is valid, and also contains an & symbol. I just used the invalid www.&.com to demonstrate how the & is treated.

Providing a real example would have helped. :)

Here's a sample ....

<imagemap>
Image:Foo.jpg|200px|picture of a foo
poly 131 45 213 41 210 110 127 109 [http://en.wikipedia.org/w/index.php?title=Display&action=history]
</imagemap>

I can confirm that the resulting link is double-HTML-escaped, leading incorrectly to http://en.wikipedia.org/w/index.php?title=Display&amp;action=history

Have put the example live at http://www.mediawiki.org/wiki/Extension:ImageMap/bug_11504

Gilles raised the priority of this task from Medium to Unbreak Now!.Dec 4 2014, 10:11 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Medium.Dec 4 2014, 11:21 AM