Page MenuHomePhabricator

[frwiki] AWB incorrectly normalizes underscores in image parameter names
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Enable 'Apply general fixes'.
  • Add a random 'Find and replace' (I used FIND \{\{ *(d|D)ate( de naissance| de décès)*- *\|([^\}]*)\| *(en|à|aux*|dans|par) [^\|\}]* REPLACE {{$1ate$2|$3, but it doesn't seem to matter).
  • Edit a page with an image with a parameter sans_cadre (e.g. this version of a page, the image code is : [[Fichier:Milky way.jpg|sans_cadre|centré| <caption text too long> ]]).

What happens?:
AWB changes the underscore to a space, making the parameter/magic word (?) inefficient (e.g. this edit )

What should have happened instead?:
AWB should have done nothing.

Other information (browser name/version, screenshots, etc.):
I used it on a tabletop PC with Windows 10 and Firefox 142.0.1 (64 bits), but I don't think it matters.
This bug happened twice on thousands of other edits, as this syntax seems quite rare.
I asked for the parameter name to have an alias with a space instead of the underscore, but it doesn't seem possible (see my request, in French).
There are other image parameters with underscore that shouldn't be modified : non_encadré, non_encadre and redresse_$1 ($1 being probably a numerical value, with a possible dot as separator, e.g. 0.7)
The other parameters can be found here (but I am not an interface admin, so I cannot help much about this).

Event Timeline

SyntaxTerror renamed this task from AWB changes underscore in image parameter (magic word ?) to AWB changes underscore to space in image parameter (magic word ?).Sep 4 2025, 9:20 PM
LD renamed this task from AWB changes underscore to space in image parameter (magic word ?) to [frwiki] AWB incorrectly normalizes underscores in image parameter names.Sep 6 2025, 10:08 AM

Possible fix(?): explicitly define image parameters in WikiRegexes.cs, since they are keywords delimited by pipes |. Typo shouldn't be applied to those parameters
(including aliases, unless the language changes from [en] to the target wiki language).

This issue could also occur in other languages, such as Italian. I’m too lazy to check every language, but this is why it would make sense to define image parameters in a centralized way.

Rjwilmsi claimed this task.

rev 13008, will be included in next release of AWB.