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

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