Page MenuHomePhabricator

Non-standard whitespace introduced on edit
Open, Needs TriagePublic

Description

When some of the editors on se.wikimedia.org have been editing pages non-standard whitespace characters (possibly nbsp characters) have been introduced onto the pages, sometimes replacing pre-existing space characters. This has caused issues since it can break templates (see T249646).

This occurs both on desktop (Chromium on Ubuntu) and on mobile (Chrome on Android) and both on page creation or editing a pre-existing page. It also happens both when the added content has been copy-pasted from somewhere else or manually entered (e.g. ~~~~). It seems to only happen when templates are edited, but that might be an observation which is biased by this breaking templates whereas the change might go unnoticed in other contexts.

While the exact source of this is not clear it does not seem to be due to the editor used since there are edits tagged as visualeditor-wikitext introducing these, but also edits done using the '2010 wikitext editor'.

Examples:

Event Timeline

@Jopparn @AxelPettersson_WMSE This has happened to both of you so it would be great to have information about:

The two links above go to page each of you have edited. The following gives hints about a few more pages where it has happened: https://quarry.wmflabs.org/query/43695

When the information has been added (to the description) then please add Aklapper as a subscriber and MediaWiki-General as a project.

Lokal_Profil renamed this task from Non standard whitespace introduced on edit to Non-standard whitespace introduced on edit.Apr 7 2020, 6:51 PM

It frequently happens both on my computer (using Chromium on Ubuntu) and on my phone (Android). The problem appears when I fill in the template. I use the old wikitext editor ('2010 wikitext editor').

It happens both when I have edited pages created by other team members (e.g. adding my signature, both by copying four tilde "~~~~", and by adding ~ manually) and when creating the entire page by copying the template.

It frequently happens both on my computer (using Chromium on Ubuntu) and on my phone (Android). The problem appears when I fill in the template. I use the old wikitext editor ('2010 wikitext editor').

Do you use Chrome on the phone as well? Please replace the ? in the description by that browser.

This comment was removed by Lokal_Profil.

Based on the history the error came when I created the page, and I probably did it by copying everything from another page. I think I used Chrome and for sure used Ubuntu at the time. I'm using the '2010 wikitext editor'.

Retrieved the raw contents via the api and the character is \xa0 so the non-breaking space.

I encountered this in et.wikipedia (fix diff). I don't know how to reproduce, but seems some editor tries to preserve whitespace by turning every second successive space into non-breaking space. Does any MediaWiki editor do that under any circumstance?