Page MenuHomePhabricator

Another searchmatch span altering searches
Closed, ResolvedPublic

Description

After T173172 was resolved, </span> tags started to appear in the results as expected. However, another trouble showed up: when the search match is contained within a section title, it is still wrapped in a searchmatch span, being even nastier than the already corrected ones. In fact, this time it is considered as part of the link and the link to the section itself is corrupted. Take this search: https://it.wikipedia.org/w/index.php?title=Speciale:Ricerca&profile=all&search=%22spazio+unificatore+come+se+piovesse%22&fulltext=1&searchToken=6cwj3dydyftxsype3vw2fwczd
the 2nd result is a match in a section title. However, the bold link includes the whole span (actually more than one) and it doesn't lead to any section because of this.

Event Timeline

Daimona created this task.Oct 18 2017, 6:30 PM
Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptOct 18 2017, 6:30 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Daimona triaged this task as High priority.Oct 19 2017, 7:54 AM

Triaging as high since it's almost the same as the other task (triaged as high) but this time it may cause bigger troubles, even to a "normal user" who doesn't care about </span>.

debt added a subscriber: debt.Oct 25 2017, 4:16 PM

Once this work is done, it should also fix T178991 (closing for being a dupe).

Change 386521 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] Strip highlighting before converting to html

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

Change 386521 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Strip highlighting before converting to html

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

Change 387440 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@wmf/1.31.0-wmf.4] Strip highlighting before converting to html

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

Change 387441 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@wmf/1.31.0-wmf.5] Strip highlighting before converting to html

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

Change 387440 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@wmf/1.31.0-wmf.4] Strip highlighting before converting to html

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

Change 387441 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@wmf/1.31.0-wmf.5] Strip highlighting before converting to html

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

debt closed this task as Resolved.Nov 9 2017, 10:08 PM