Page MenuHomePhabricator

TextExtracts does not exclude sortkeys (which have style="display:none")
Closed, DuplicatePublic

Description

Some templates, such as {{val}} on English Wikipedia, output hidden sortkeys. For example, {{val|1110}} outputs:

<span class="nowrap"><span style="display:none" class="sortkey">7003111000000000000♠</span>1110</span>

TextExtracts should ideally strip or ignore the hidden span, but instead it converts it into a displayed span:

<span><span>7003111000000000000♠</span>1110</span>

See for example: https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars=200&titles=50000%20Quaoar

Screen Shot 2017-03-22 at 10.30.06 PM.png (437×339 px, 89 KB)

Event Timeline

Aklapper renamed this task from TextExtracts does not exclude sortkeys to TextExtracts does not exclude sortkeys (which have style="display:none").Mar 23 2017, 3:04 PM

Change 344742 had a related patch set uploaded (by Kaldari):
[mediawiki/extensions/TextExtracts@master] Adding sortkey class to ExtractsRemoveClasses

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