Page MenuHomePhabricator

Normalize consecutive spaces when building the sort values
Closed, ResolvedPublic

Description

This task is a follow-up to T326081 (and nicely complements it). Normalize consecutive spaces, just like HTML does.

This way, the extraneous spaces wouldn't unexpectedly affect the sorting in the following cases:

Extraneous space in user input:

foo bar
foo  bar

Spaces around a <br> tag:

foo<br>bar
foo<br> bar
foo <br> bar

Note that in data-sort-value attributes, the consecutive spaces were already normalized (see my comments in T326081).

Event Timeline

Change 876314 had a related patch set uploaded (by Gerrit Patch Uploader; author: Hank Hulet):

[mediawiki/core@master] Normalize consecutive spaces when building the sort values

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

Change 876314 merged by jenkins-bot:

[mediawiki/core@master] Normalize consecutive spaces when building the sort values

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

matmarex subscribed.

The patch was sent by "Hank Hulet", I couldn't find their Phabricator account. Thanks!