Page MenuHomePhabricator

"Move french space armoring below language conversion" change broke tag extensions nowiki typemarker
Closed, DuplicatePublic

Description

https://gerrit.wikimedia.org/r/c/mediawiki/core/+/593017

This alters a tag extensions nowiki typemarker. Changing spaces to

 

even in non-french wikis.

Reverting this commit in a local test environment fixes the issue

Event Timeline

Aklapper renamed this task from Move french space armoring below language conversion patch breaks tag extensions nowiki typemarker to "Move french space armoring below language conversion" change broke tag extensions nowiki typemarker.Feb 16 2021, 11:14 AM
Aklapper removed a project: Gerrit.
Aklapper added a subscriber: Arlolra.

Hi @Sen-Sai, thanks for taking the time to report this!

Could you please elaborate on "This alters a tag extensions nowiki typemarker." ?

(Removed Gerrit tag as this is unrelated to Gerrit's codebase itself.)

Sure,
With a tag extension you set a hook that can be used :
e,g,

$parser->setHook( 'wsform', 'WSFormHooks::WSForm' );

When its invoked it will call the (in this case) WSFormHooks::WSForm function.
The function returns its content this way :

return array( $htmlContent, "markerType" => 'nowiki');

It should mean to output whatever I give back. This always worked fine. But with the change made that I mention here the ( Sanitizer::armorFrenchSpaces( $text ); being moved down in the code ) it messes up output and replaces spaces with

 

in certain conditions before a ! or =
and my wiki is not even French :-)

As I mentioned in the task description reverting this https://gerrit.wikimedia.org/r/c/mediawiki/core/+/593017 solves the issue