Page MenuHomePhabricator

Format reading list entry page titles with spaces in API responses
Closed, ResolvedPublic2 Estimated Story Points

Description

As a follow up to T419466: Spike - Title normalization is not applied when saving pages to the reading list via the API and T422028: Normalize ReadingLists entry page titles on database reads and writes, when the ReadingLists API endpoints query and fetch reading list entries, we should ensure the page titles are formatted with spaces:

strtr( $row->rle_title, '_', ' ' )

This ensures consistent formatting of the page titles regardless of how they are stored in the database.

When we implement this, there should be tests that cover this behavior.

Formatting the titles with spaces will be compatible with the mobile apps, without required changes to the mobile apps.

Event Timeline

aude triaged this task as High priority.Apr 1 2026, 4:12 PM
aude moved this task from Incoming to Needs refinement on the Reader Experience Team board.
aude set the point value for this task to 2.Apr 1 2026, 5:53 PM
aude moved this task from Needs refinement to Ready for sprint on the Reader Experience Team board.

Change #1268684 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/extensions/ReadingLists@master] Format list entry page titles with spaces in API responses

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

Change #1271851 had a related patch set uploaded (by Aude; author: Aude):

[mediawiki/extensions/ReadingLists@master] Add tests for pagination in reading list entry query APIs

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

Change #1268684 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] Format list entry page titles with spaces in API responses

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

Change #1271851 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] Add tests for pagination in reading list entry query APIs

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

Etonkovidova subscribed.

Checked on enwiki wmf 24 and mobile apps (iOS and Android. All seems to work as expected - no duplicate articles got saved.

How it was tested:

  • articles in spaces in the title - a long title with spaces was tested

Additional tests for titles with spaces and that have additional complexity in titles (e.g. https://en.wikipedia.org/wiki/%2B%E2%88%92%3D%C3%B7%C3%97_Tour):

  • an article title that starts with a number
  • an article title that starts with a special character
  • an article title that starts with diacritics
HFan-WMF claimed this task.