From 2491a827ed6023555040ec4171b21105ff6f5698 Mon Sep 17 00:00:00 2001
From: Aaron Schulz
Date: Tue, 29 May 2007 19:53:23 +0000
Subject: [PATCH] *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.
---
includes/GlobalFunctions.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) ) {
--
2.20.1