Summary: Parser->serialiseHalfParsedText($text) does not save
                    strip items if $text begins with a strip marker
           Product: MediaWiki
           Version: 1.16.0
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: easy
          Severity: minor
          Priority: Normal
         Component: Page rendering

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.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

Wikibugs-l mailing list

Reply via email to