From: Brad Jorsch Date: Fri, 20 Sep 2013 16:40:17 +0000 (-0400) Subject: Improve wfEscapeWikiText, part 2 X-Git-Tag: 1.31.0-rc.0~18693^2 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=b670b6de3a474d9b247bbe734fb7b5799a03f385;p=lhc%2Fweb%2Fwiklou.git 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 --- 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----", '__' => '__', '://' => '://', );