Page MenuHomePhabricator

Incorrect treatment of non-basic latin characters in ol and ul formats of {{#ask:}}
Closed, ResolvedPublic

Description

In SMW 1.9 under MW 1.22, SemanticMediaWiki/includes/queryprinters/ListResultPrinter.php has $sortKey{0} rather than mb_substr ($sortKey, 0, 1).

As a result, when a call of {{#ask:}} parser function with format=ol/ul returns, among others, a page that has a multibyte Unicode character in its title, the attribute data-sortkey of the corresponding list item is malformed.

Most probably, this causes {{#ask:}} breaking out of the first parametre of other parser functions, like {{#if:}} or {{#len:}}.

The example is here: http://semantic-mediawiki.org/wiki/User:Alex_Mashin.

I think, this is a critical bug that blocks upgrade of both SMW and MW (to 1.22.1, due to broken backward compability) in any copmplex SMW project that uses {{#ask:}} combined with other parser functions.


Version: REL1_22-branch
Severity: critical

Details

Reference
bz60336

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:55 AM
bzimport set Reference to bz60336.
bzimport added a subscriber: Unknown Object (MLST).

in line 334 of SemanticMediaWiki/includes/queryprinters/ListResultPrinter.php.

Unknown Object (User) added a comment.Feb 1 2014, 10:27 AM

Merged and will be deployed with 1.9.0.3.