Page MenuHomePhabricator

Wikifunction parser tag: Trimming wikitext inputs means users can't use whitespace-only inputs, but not trimming them would break user inputs of wikitext
Closed, ResolvedPublic

Description

Currently we use array_map on Sanitizer::decodeCharReferences() to turn our passed $args into an array of $cleanedArgs. This is a mess, and possibly(?) loses information. We should consider if this is a problem, and if so, replace it with something better.

Event Timeline

DSantamaria changed the task status from Open to In Progress.Jan 31 2025, 11:58 AM
Jdforrester-WMF renamed this task from Wikifunction parser tag: Expand $args properly to Wikifunction parser tag: Trimming wikitext inputs means users can't use whitespace-only inputs, but not trimming them would break user inputs of wikitext.Mar 12 2025, 4:32 PM
Jdforrester-WMF removed Jdforrester-WMF as the assignee of this task.
Jdforrester-WMF subscribed.

Change #1147123 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Don't trim arguments which are only whitespaces

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

Change #1147123 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Don't trim arguments which are only whitespaces

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

Hi @Jdforrester-WMF @gengh
Just for my understanding, this is not OKR-Work nor Essential-Work, and not a Bug or Production error. Why did it jump on our quarter?

It's OKR work, but wasn't tagged as such.