continue;
}
$name = $matches[1];
+ $lowerName = strtolower( $name );
$attrStart = $i + strlen( $name ) + 1;
// Find end of tag
}
// Handle ignored tags
- if ( in_array( $name, $ignoredTags ) ) {
+ if ( in_array( $lowerName, $ignoredTags ) ) {
$accum->addNodeWithText( 'ignore', substr( $text, $i, $tagEndPos - $i + 1 ) );
$i = $tagEndPos + 1;
continue;
}
}
// <includeonly> and <noinclude> just become <ignore> tags
- if ( in_array( $name, $ignoredElements ) ) {
+ if ( in_array( $lowerName, $ignoredElements ) ) {
$accum->addNodeWithText( 'ignore', substr( $text, $tagStartPos, $i - $tagStartPos ) );
continue;
}
{
return '<span class="error">Node-count limit exceeded</span>';
}
+ if ( $depth > $this->parser->mOptions->mMaxPPExpandDepth ) {
+ return '<span class="error">Expansion depth limit exceeded</span>';
+ }
+ ++$depth;
$outStack = array( '', '' );
$iteratorStack = array( false, $root );
$titleText = $this->title->getPrefixedDBkey();
$this->parser->mHeadings[] = array( $titleText, $bits['i'] );
$serial = count( $this->parser->mHeadings ) - 1;
- $marker = "{$this->parser->mUniqPrefix}-h-$serial-{$this->parser->mMarkerSuffix}";
+ $marker = "{$this->parser->mUniqPrefix}-h-$serial-" . Parser::MARKER_SUFFIX;
$s = substr( $s, 0, $bits['level'] ) . $marker . substr( $s, $bits['level'] );
$this->parser->mStripState->general->setPair( $marker, '' );
$out .= $s;
}
}
}
+ --$depth;
return $outStack[0];
}
}
/**
- * Split an <arg> node into a three-element array:
- * PPNode name, string index and PPNode value
+ * Split a <part> node into an associative array containing:
+ * name PPNode name
+ * index String index
+ * value PPNode value
*/
function splitArg() {
$bits = array();
}
/**
- * Split a <h> node
+ * Split an <h> node
*/
function splitHeading() {
if ( $this->name !== 'h' ) {