#cscore Parser Function breaks #expr with error "Expression error: Unrecognised punctuation character ""."
Description
Related Objects
Event Timeline
Hi @17jiangz1,
thanks for taking the time to report this!
Could you provide a minimal testcase please? Which version of MediaWiki and which version of the extension is this about?
Also see https://www.mediawiki.org/wiki/How_to_report_a_bug
Unfortunately closing this Phabricator task as no further information has been provided.
@17jiangz1: After you have provided the information asked for and if this still happens, please set the status of this task back to "Open" via the Add Action... → Change Status dropdown. Thanks!
Bug still happens.
MediaWiki 1.36.2
PHP 7.4.3 (fpm-fcgi)
MariaDB 10.3.31-MariaDB-0ubuntu0.20.04.1
ICU 66.1
ContributionScores 1.26.0 2 sep 2021 18:31
a minimal testcase:
{{#expr: {{#cscore:UserName}} }}
{{#ifexpr: {{#cscore:UserName}} > 1500 | high| low }}
Changing line 80 in src/ContributionScores.php from:
return $parser->insertStripItem( $output, $parser->mStripState );
to
return $output ;
seems to solve it, but I don't know if this has unwanted side effects.