From 7dd27a858cc4c455b466625fca0fe7fe44220912 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 23 Nov 2010 02:39:04 +0000 Subject: [PATCH] In wfEscapeWikiText(), add "}}" to the list of things to escape, for callers that produce template invocations, as in r77128. --- includes/GlobalFunctions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 4a714d19f3..80b15a3eed 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1287,8 +1287,10 @@ function wfCheckLimits( $deflimit = 50, $optionname = 'rclimit' ) { */ function wfEscapeWikiText( $text ) { $text = str_replace( - array( '[', '|', ']', '\'', 'ISBN ', 'RFC ', '://', "\n=", '{{' ), # }} - array( '[', '|', ']', ''', 'ISBN ', 'RFC ', '://', "\n=", '{{' ), + array( '[', '|', ']', '\'', 'ISBN ', + 'RFC ', '://', "\n=", '{{', '}}' ), + array( '[', '|', ']', ''', 'ISBN ', + 'RFC ', '://', "\n=", '{{', '}}' ), htmlspecialchars( $text ) ); return $text; -- 2.20.1