From 44ba2ff23b5d0602a0b9f541a493ddb04f01db03 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 12 Jan 2006 15:42:38 +0000 Subject: [PATCH] Fixed ~~~~, problem reported on enwiki village pump --- includes/Parser.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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; } -- 2.20.1