Page MenuHomePhabricator

`usergroups` field label entity-encoded twice in Special:Preferences
Closed, ResolvedPublic


Steps to Reproduce:

  1. Go to
  2. Make sure that you are logged in (and that the current interface language is set to fr – français)
  3. Look at the usergroups field label on the Special:Preferences page

Actual Results: The label says "Membre des groupes :" (sic)

Expected Results: The label should say "Membre des groupes :" (with a non-breakable space before the colon).

Possible Cause: Inside Preferences:: profilePreferences() method, the parse()-ed message MediaWiki:prefs-memberingroups is filled in the label member of $defaultPreferences['usergroups'] instead of label-raw, causing a second entity-escaping to occur in HTMLFormField::__construct().

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 12 2016, 10:55 PM
Od1n triaged this task as Medium priority.Aug 23 2016, 7:53 AM
Od1n added a project: good first task.
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptAug 23 2016, 7:53 AM
Od1n added a subscriber: Od1n.Aug 23 2016, 7:54 AM
Od1n added a comment.Sep 28 2016, 2:38 AM

The translation[1] has been edited so currently you can't see the issue in the preferences[2], though it still exists.


Change 320156 had a related patch set uploaded (by Pmlineditor):
Prevent double escaping of 'usergroups' field label in Preferences

Framawiki moved this task from Backlog to Doing on the good first task board.Dec 2 2017, 1:32 PM

Change 320156 abandoned by Pmlineditor:
Prevent double escaping of 'usergroups' field label in Preferences

Umherirrender closed this task as Resolved.Sep 18 2018, 6:55 PM
Umherirrender added a subscriber: Umherirrender.

It works for me now.

The message is 'prefs-memberingroups'

Framawiki reopened this task as Open.Dec 2 2018, 9:22 PM
Framawiki added subscribers: Nikerabbit, Bastenbas, Framawiki.

A user reported to me that the problem is still present. See
Screenshot: (yay hosted on framacorp website)
No local message overwrite exists:

Od1n added a comment.Dec 3 2018, 3:52 AM

Note that previously the preferences had been fixed, by using in the message a nbsp character (instead of a html entity), and it was working fine.

Recently the   appeared back in the preferences, and I have tried to fix this by just replacing the nbsp character with a regular space. Apparently it didn't work, as the   is still present.

My guess is that the bug is produced in two steps:

  • First, mediawiki automatically replaces the regular space with a nbsp entity (French typography rule)
  • Then, this entity is unexpectedly escaped

The logical thing to do would be to not parse this message. But I am afraid there will be local customizations that expect that.

Pols12 added a subscriber: Pols12.Jan 13 2019, 3:28 PM
Ammarpad claimed this task.Jan 26 2020, 6:20 AM

Change 567314 had a related patch set uploaded (by DannyS712; owner: Ammarpad):
[mediawiki/core@master] Disable parsing of prefs-memberingroups message

Change 567314 merged by jenkins-bot:
[mediawiki/core@master] Disable parsing of prefs-memberingroups message

Nikerabbit closed this task as Resolved.May 26 2020, 9:11 AM