Page MenuHomePhabricator

File names containing URL special characters are not properly escaped in log links on Commons (due to custom JS)
Closed, InvalidPublic

Description

A file containing an ampersand (&) in the file name was deleted. The ImagePage that is shown in the historical file location displays the log message that documents the deletion. Within this log message entry links are provided to [[Special:GlobalUsage]] and toolserver.org/~delinker. Neither of these links properly encodes the ampersand for use in a URL. The ampersand appears as a litter element of the link href instead of being encoded as a '%26' entity.

See https://commons.wikimedia.org/wiki/File:Diallob%26w.jpg


Version: 1.22.0
Severity: normal

Details

Reference
bz53861

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:57 AM
bzimport set Reference to bz53861.
bzimport added a subscriber: Unknown Object (MLST).

This may not be a bug in core. It may be a bug in one or more extensions installed on commons. Or it may be a core bug that those extensions expose.

Cannot reproduce on my vagrant vm as I apparently don't have the appropriate extensions installed/configured. Will continue to investigate.

This is not a bug in any MediaWiki related code, Commons actually has some custom javascript to add the "delinker log" and "global usage" links, I filed a request to fix the JS at https://commons.wikimedia.org/wiki/MediaWiki_talk:Common.js#urlencode_global_usage_.2F_delinker_log_links