From b670b6de3a474d9b247bbe734fb7b5799a03f385 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Fri, 20 Sep 2013 12:40:17 -0400 Subject: [PATCH] Improve wfEscapeWikiText, part 2 The following are now correctly escaped: * Blank lines (including those with only tabs) * ---- at the start of a line Bug: 53658 Change-Id: I300e15a22c93ca542913135c9c83913c18c99faf --- includes/GlobalFunctions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 0c92ab6535..414c8222f2 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2032,6 +2032,10 @@ function wfEscapeWikiText( $text ) { "\n*" => "\n*", "\r*" => "\r*", "\n:" => "\n:", "\r:" => "\r:", "\n " => "\n ", "\r " => "\r ", + "\n\n" => "\n ", "\r\n" => " \n", + "\n\r" => "\n ", "\r\r" => "\r ", + "\n\t" => "\n ", "\r\t" => "\r ", // "\n\t\n" is treated like "\n\n" + "\n----" => "\n----", "\r----" => "\r----", '__' => '__', '://' => '://', ); -- 2.20.1