Author: Jared.Williams1
Description:
Browsing more Parser.php https://static-codereview.wikimedia.org/MediaWiki/28588.html code and found this inconsistency.
Parser::doTableStuff() ( Parser.php:740 ) trim()s the line before attempting to match table tokens. Thereby allowing a table token to appear after whitespace or NUL characters.
Eg:
{|
T2529 resolution in Parser::braceSubstitution() ( Parser.php:3354 ) doesn't take into account possible whitespace or NUL characters.
if (!$piece['lineStart'] && preg_match('/^(?:{\\||:|;|#|\*)/', $text)) /*}*/{ $text = "\n" . $text; }
Version: 1.21.x
Severity: minor