From: Aaron Schulz Date: Tue, 29 May 2007 19:53:23 +0000 (+0000) Subject: *Add U param to parseinline regexp to fix regression that left the \n in parsed messa... X-Git-Tag: 1.31.0-rc.0~52777 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=2491a827ed6023555040ec4171b21105ff6f5698;p=lhc%2Fweb%2Fwiklou.git *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

tag, allowing the \n? to be ignored since it is optional. --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 0505109a8c..88e1fe5aed 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -592,7 +592,7 @@ function wfMsgExt( $key, $options ) { } elseif ( in_array('parseinline', $options) ) { $string = $wgOut->parse( $string, true, true ); $m = array(); - if( preg_match( '/^

(.*)\n?<\/p>$/s', $string, $m ) ) { + if( preg_match( '/^

(.*)\n?<\/p>$/sU', $string, $m ) ) { $string = $m[1]; } } elseif ( in_array('parsemag', $options) ) {