Last modified: 2012-10-16 15:31:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14339, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12339 - Inconsistent table recognition
Inconsistent table recognition
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.21.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-18 12:47 UTC by Jared Williams
Modified: 2012-10-16 15:31 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jared Williams 2007-12-18 12:47:42 UTC
Browsing more Parser.php r28588 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:
            {|

Bug #529 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;
}
Comment 1 Andre Klapper 2012-10-16 15:31:32 UTC
Current code says:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/parser/Parser.php;h=8671665ffc8cec343f8852dbdfa4e238a8591011;hb=HEAD#l3462

3463                         && !$piece['lineStart']
3464                         && preg_match( '/^(?:{\\||:|;|#|\*)/', $text ) )

so I guess this is still valid...

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links