Index: trunk/phase3/includes/Parser.php |
— | — | @@ -1426,9 +1426,7 @@ |
1427 | 1427 | $fname = 'Parser::replaceVariables'; |
1428 | 1428 | wfProfileIn( $fname ); |
1429 | 1429 | |
1430 | | - $bail = false; |
1431 | 1430 | $titleChars = Title::legalChars(); |
1432 | | - $nonBraceChars = str_replace( array( '{', '}' ), array( '', '' ), $titleChars ); |
1433 | 1431 | |
1434 | 1432 | # This function is called recursively. To keep track of arguments we need a stack: |
1435 | 1433 | array_push( $this->mArgStack, $args ); |
— | — | @@ -1438,7 +1436,7 @@ |
1439 | 1437 | |
1440 | 1438 | if ( $this->mOutputType == OT_HTML || $this->mOutputType == OT_MSG ) { |
1441 | 1439 | # Variable substitution |
1442 | | - $text = preg_replace_callback( "/{{([$nonBraceChars]*?)}}/", 'wfVariableSubstitution', $text ); |
| 1440 | + $text = preg_replace_callback( "/{{([$titleChars]*?)}}/", 'wfVariableSubstitution', $text ); |
1443 | 1441 | } |
1444 | 1442 | |
1445 | 1443 | if ( $this->mOutputType == OT_HTML ) { |
— | — | @@ -1446,7 +1444,7 @@ |
1447 | 1445 | $text = preg_replace_callback( "/{{{([$titleChars]*?)}}}/", 'wfArgSubstitution', $text ); |
1448 | 1446 | } |
1449 | 1447 | # Template substitution |
1450 | | - $regex = '/{{(['.$nonBraceChars.']*)(\\|.*?|)}}/s'; |
| 1448 | + $regex = '/{{(['.$titleChars.']*)(\\|.*?|)}}/s'; |
1451 | 1449 | $text = preg_replace_callback( $regex, 'wfBraceSubstitution', $text ); |
1452 | 1450 | |
1453 | 1451 | array_pop( $this->mArgStack ); |
— | — | @@ -1781,7 +1779,7 @@ |
1782 | 1780 | $htmlattrs = $this->getHTMLattrs () ; |
1783 | 1781 | |
1784 | 1782 | # Remove HTML comments |
1785 | | - $text = preg_replace( '/(\\n *<!--.*--> *|<!--.*?-->)/sU', '', $text ); |
| 1783 | + $text = preg_replace( '/(\\n *<!--.*--> *|<!--.*-->)/sU', '', $text ); |
1786 | 1784 | |
1787 | 1785 | $bits = explode( '<', $text ); |
1788 | 1786 | $text = array_shift( $bits ); |