From 3dd56202e1a167879aede87a0e65ae08ffebb792 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 19 Jan 2006 06:29:41 +0000 Subject: [PATCH] use wfRegexReplacement() which was added a little while ago to cover this silly regex case --- includes/Linker.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index 9ac52a2ab6..ab962091a2 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -732,9 +732,7 @@ class Linker { $match[1] = substr($match[1], 1); $thelink = $this->makeLink( $match[1], $text, "", $trail ); } - # Quote backreferences, then run preg_replace - $thelink = strtr( $thelink, array( "\\" => "\\\\", '$' => "\\$" ) ); - $comment = preg_replace( $linkRegexp, $thelink, $comment, 1 ); + $comment = preg_replace( $linkRegexp, wfRegexReplacement( $thelink ), $comment, 1 ); } wfProfileOut( $fname ); return $comment; -- 2.20.1