r22541 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22540‎ | r22541 | r22542 >
Date:19:53, 29 May 2007
Author:aaron
Status:old
Tags:
Comment:
*Add U param to parseinline regexp to fix regression that left the \n in parsed messages. (.*) was being greedy swallowing up the \n character before the </p> tag, allowing the \n? to be ignored since it is optional.
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -592,7 +592,7 @@
593593 } elseif ( in_array('parseinline', $options) ) {
594594 $string = $wgOut->parse( $string, true, true );
595595 $m = array();
596 - if( preg_match( '/^<p>(.*)\n?<\/p>$/s', $string, $m ) ) {
 596+ if( preg_match( '/^<p>(.*)\n?<\/p>$/sU', $string, $m ) ) {
597597 $string = $m[1];
598598 }
599599 } elseif ( in_array('parsemag', $options) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r22549Merged revisions 22518-22547 via svnmerge from...david01:48, 30 May 2007