Last modified: 2012-04-12 13:54:10 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 T28731, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26731 - Parser->serialiseHalfParsedText($text) does not save strip items if $text begins with a strip marker
Parser->serialiseHalfParsedText($text) does not save strip items if $text beg...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.16.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 26858
  Show dependency treegraph
 
Reported: 2011-01-14 19:24 UTC by foxlit.mwzilla
Modified: 2012-04-12 13:54 UTC (History)
2 users (show)

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


Attachments

Description foxlit.mwzilla 2011-01-14 19:24:34 UTC
The serialiseHalfParsedText method in the Parser class attempts to store all strip markers, links, etc needed to render a bit of wikitext. It finds the strip markers in the provided text using a while loop; in 1.16.0, this is in includes/parser/Parser.php, line 5087:
while( ( $start_pos = strpos( $text, $this->mUniqPrefix, $pos ) ) && ( $end_pos = strpos( $text, self::MARKER_SUFFIX, $pos ) ) )

If $text begins with a strip marker, $start_pos will be assigned 0; which causes the while condition to be false; so serialiseHalfParsedText will not store any strip markers at all; checking whether the strpos return is identical to FALSE would fix this.

While I'm running into this issue on 1.16.0, the same while loop exists in SVN revision 80248.

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


Navigation
Links