Page MenuHomePhabricator

"&" in page names displayed as "&" by GlobalUsage
Closed, ResolvedPublicBUG REPORT

Description

Global Usage does not display "&" correctly in page names when listing "File usage on other wikis" for Commons files.
This is different from the listing of "File usage on Commons", which has correct "&" in Commons page names.

Steps to Reproduce:
*Use a Commons file in a Wikipedia page with "&" in the page name. (For example in Swedish Wikipedia article Svenne & Lotta.)
*Go to the "File usage on other wikis" section of the Commons file page. (File:Svenne & Lotta in May 2013.jpg

Actual Results:
The page name is displayed with "&" ("Svenne & Lotta")

Expected Results:
The actual page name is displayed with "&" ("Svenne & Lotta")


Another example:

Screenshot_2021-03-30_10-37-28.png (440×587 px, 43 KB)

From https://commons.wikimedia.org/wiki/File:Baume-Mercier_Geneve_003.jpg

Event Timeline

Thank you @Lejonel. I've attached a screenshot, just in case.

It seems the code is calling htmlentities() somewhere twice.

Change 692590 had a related patch set uploaded (by Ammarpad; author: Ammarpad):

[mediawiki/extensions/GlobalUsage@master] SpecialGlobalUsage: Avoid double escaping page title

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

Change 692590 merged by jenkins-bot:

[mediawiki/extensions/GlobalUsage@master] SpecialGlobalUsage: Avoid double escaping page title

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

Ammarpad claimed this task.

Change 692646 had a related patch set uploaded (by SBassett; author: Ammarpad):

[mediawiki/extensions/GlobalUsage@REL1_36] SpecialGlobalUsage: Avoid double escaping page title

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

Change 692647 had a related patch set uploaded (by SBassett; author: Ammarpad):

[mediawiki/extensions/GlobalUsage@REL1_35] SpecialGlobalUsage: Avoid double escaping page title

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

Change 692648 had a related patch set uploaded (by SBassett; author: Ammarpad):

[mediawiki/extensions/GlobalUsage@REL1_31] SpecialGlobalUsage: Avoid double escaping page title

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

Change 692648 merged by jenkins-bot:

[mediawiki/extensions/GlobalUsage@REL1_31] SpecialGlobalUsage: Avoid double escaping page title

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

Change 692646 merged by jenkins-bot:

[mediawiki/extensions/GlobalUsage@REL1_36] SpecialGlobalUsage: Avoid double escaping page title

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

Change 692647 merged by jenkins-bot:

[mediawiki/extensions/GlobalUsage@REL1_35] SpecialGlobalUsage: Avoid double escaping page title

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