Copying from CR: https://gerrit.wikimedia.org/r/#/c/84342/5
"$html = str_replace( ' <', ' <', $html );" – commented only with a link to bug 53086, apparently ugly workaround for some bug or feature
"if ( wfIsWindows() ) { $html = str_replace( ' ', '', $html ); }" – not commented on at all
Supported CSS selectors for remove() are not documented.
elementsToFlatten functionality uses very simple regexes for the transformation; it should be documented that it only works correctly if the elements have no attributes, lest someone use it for HTML sanitization.
Version: 1.22.0
Severity: normal