Page MenuHomePhabricator

Sanitizer::escapeClass() creates the same class name for different pages
Open, Needs TriagePublic

Description

Hello,

Hope I can explain this issue well, but today a user created الصفحة+الرئيسية (Mean in English Main+Page), which is same name of arwiki main page الصفحة الرئيسية but without +

The user created this page with spam, and arwiki sysops can't delete it as there's no "delete" button, and the title not appear! So the user moved it to another title (الصفحة+الرئيسية 222) - added 222.

When I try to see Main+Page in enwiki, I found it redirected directly to enwiki Main page.

But I found that enwiki is the only wiki which Main+page redirected to the Main page.

So I don't know if I'd redirect the page on arwiki also from (+) title to the main page using the using usual way

#REDIRECT [[]]

Or it need technical things on code(?) itself?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 18 2020, 8:24 PM
alanajjar updated the task description. (Show Details)Jan 18 2020, 8:25 PM

Arwiki has an entry in their MediaWiki:Common.css that hides the deletion link on "Main Page" (in Arabic). It uses the body.page-<title> class added by MediaWiki during rendering to do this. When adding that class, the page name is converted to use underscores, so it would be .page-Main_Page in this case. The code to add the class also converts + characters to underscores, so "Main+Page" became .page-Main_Page as well. I tested this on + (disambiguation) as well, which gave the class .page-_disambiguation.

Specifically, that conversion is done in Sanitizer::escapeClass().

AntiCompositeNumber renamed this task from Can't delete (Main+Page) title on all wikis expect enwiki to Sanitizer::escapeClass() creates the same class name for different pages.Jan 18 2020, 9:29 PM
Izno added a subscriber: Izno.Jan 20 2020, 4:03 AM

This can be worked around by accessing ?action=delete directly, I would believe.

This can be worked around by accessing ?action=delete directly, I would believe.

Yup, or move then delete. But I don't think "delete" is the main issue here.