Page MenuHomePhabricator

Section link/anchor included in Notifications doesn't work due to ".C2.A0" instead of "_"
Closed, ResolvedPublic

Description

For the section "Using Wikimedia maps instead of geohack ?", the notifications panel links to #Using_Wikimedia_maps_instead_of_geohack.C2.A0.3F (which does not work) when it should actually link to #Using_Wikimedia_maps_instead_of_geohack_.3F.

Event Timeline

Jc86035 created this task.Nov 16 2017, 1:37 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 16 2017, 1:37 PM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptNov 16 2017, 1:40 PM
TheDJ added a subscriber: TheDJ.Nov 16 2017, 2:37 PM
Aklapper renamed this task from Notifications – section link doesn't work to Section link/anchor included in Notifications doesn't work due to ".C2.A0" instead of "_".Nov 16 2017, 2:38 PM

Looks like we are not correctly normalizing whitespace here? .C2.A0 is the encoding for a non-breaking space, but the other code seems to normalize that to a space. Ideally we'd use the same code for generating section anchors that's used everywhere else, but I'm not sure if that's exposed.

This seems to be a regression kind of caused by rMW129067c907ea: Remove nbsp and similar characters from section IDs, in the sense that that commit changes the way the parser builds section IDs and we are mimicking but not using that in Echo (not sure why).

Change 392992 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/Echo@master] PresentationModelSectionTrait: Use section anchor generation from code

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

Change 392992 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] PresentationModelSectionTrait: Use section anchor generation from code

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

Checked the fix in betalabs.

Etonkovidova closed this task as Resolved.Jan 4 2018, 9:35 PM