From: Tim Starling Date: Thu, 12 Jan 2006 15:42:38 +0000 (+0000) Subject: Fixed ~~~~, problem reported on enwiki village pump X-Git-Tag: 1.6.0~594 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=44ba2ff23b5d0602a0b9f541a493ddb04f01db03;p=lhc%2Fweb%2Fwiklou.git Fixed ~~~~, problem reported on enwiki village pump --- diff --git a/includes/Parser.php b/includes/Parser.php index 0030dacda1..b6af7fa922 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3167,15 +3167,17 @@ class Parser putenv( 'TZ='.$oldtz ); } - # Signatures - $sigText = $this->getUserSig( $user ); - $text = preg_replace( '/~~~~~/', $d, $text ); - $text = preg_replace( '/~~~~/', "$sigText $d", $text ); - $text = preg_replace( '/~~~/', $sigText, $text ); - # Variable replacement # Because mOutputType is OT_WIKI, this will only process {{subst:xxx}} type tags $text = $this->replaceVariables( $text ); + + # Signatures + $sigText = $this->getUserSig( $user ); + $text = strtr( $text, array( + '~~~~~' => $d, + '~~~~' => "$sigText $d", + '~~~' => $sigText + ) ); # Context links: [[|name]] and [[name (context)|]] # @@ -3287,6 +3289,8 @@ class Parser ); $text = preg_replace( '/~{3,5}/', '', $text ); + $text = $this->replaceVariables( $text ); + return $text; }