Page MenuHomePhabricator

Certain characters in usernames cause the space before them to encode to   in MobileFrontEnd 'no user page' messages
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

Go to the link for a user with an exclamation mark in their name but doesn't have a user page on the mobile site (e.g. https://en.m.wikipedia.org/wiki/User:!!!!)

What happens?:
Displays No user page for !!!! and This page should be created and edited by !!!! (hopefully Phabricator doesn't try to fix the display)

https://en.m.wikipedia.org/wiki/User:!!!!?uselang=qqx suggests it's an issue with the value the message uses rather than the message itself

It also seems to happen with question marks, semicolons and percent signs (e.g. https://es.m.wikipedia.org/wiki/Usuario:%3F_I%27m_a_person_"ordinary"_%3F)

What should have happened instead?:
Spaces should not be encoded

Other information (browser name/version, screenshots, etc.):
Chrome 122.0.6261.105

Event Timeline

Nintendofan885 renamed this task from Usernames that have certain characters cause the space before to encode to   in MobileFrontEnd 'no user page' messages to Certain characters in usernames cause the space before then to encode to   in MobileFrontEnd 'no user page' messages.Mar 15 2024, 2:38 PM
Nintendofan885 renamed this task from Certain characters in usernames cause the space before then to encode to   in MobileFrontEnd 'no user page' messages to Certain characters in usernames cause the space before them to encode to   in MobileFrontEnd 'no user page' messages.
ovasileva triaged this task as Medium priority.Mar 19 2024, 1:54 PM
ovasileva moved this task from Incoming to Current Fiscal Year on the Web-Team-Backlog-Archived board.

Change #1226887 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/MobileFrontend@master] Fix improperly processed messages

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

Change #1226887 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Fix improperly processed messages

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

@matthiasmullie - Checking this task, I tried out some problematic real user names on enwiki and eswiki. I noticed that one particular case is not fixed. When a user name has a space before ? or !, the  ! will be displayed:
user_name - Kitty !

Screenshot 2026-01-15 at 5.43.00 PM.png (1,057×462 px, 42 KB)

Should such case be address too?
If a space happens after ! or ? - all looks fine:

Screenshot 2026-01-15 at 5.33.56 PM.png (2,112×900 px, 107 KB)
Screenshot 2026-01-15 at 5.29.07 PM.png (2,200×904 px, 124 KB)

Change #1227727 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/MobileFrontend@master] Fix improperly processed message

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

Good catch, @Etonkovidova.
This one would trigger under slightly different conditions (part of the problem, the <space> before the punctuation, was not already in the message right before the username, so it only affects usernames that have both space + punctuation), but it's essentially the same problem!
Another patch in CR.

Change #1227727 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Fix improperly processed message

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

Thanks, @matthiasmullie!
Checked on enwiki wmf.12 for real user names with !, ?, and %characters in usernames with spaces before and after those characters. The issue is fixed.