Page MenuHomePhabricator

[Minerva TOC] Escape characters in querySelector
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

Error found on production wiki: https://en.wikipedia.org/wiki/Bernoulli_number?mpo=minerva-toc-sticky:treatment#Reconstruction_of_%22Summ%C3%A6_Potestatum%22

DOMException: Element.querySelector: 'a[href="#Reconstruction_of_"Summæ_Potestatum""]' is not a valid selector

Steps to test:

  • go to a page with a section header that has special characters eg. == Reconstruction of "Summæ Potestatum" == section on Bernoulli number
  • activate page with ?mpo=minerva-toc-sticky:treatment
  • scroll until the Reconstruction of "Summæ Potestatum" appears as the active/sticky section
  • click the TOC button on the sticky heading

Expected behavior:

  • should not show JS errors in console
  • should highlight the Reconstruction of "Summæ Potestatum" section in the TOC

Details

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedBUG REPORTmatthiasmullie

Event Timeline

Change #1238719 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@master] Escape selector

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

matthiasmullie renamed this task from Escape characters in querySelector to [Minerva TOC] Escape characters in querySelector.Feb 11 2026, 2:02 PM
matthiasmullie claimed this task.

Change #1238719 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Escape selector

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

lwatson set the point value for this task to 1.