From: Brad Jorsch Date: Mon, 15 Dec 2014 21:59:42 +0000 (-0500) Subject: Normalize "\r" newlines in preSaveTransform X-Git-Tag: 1.31.0-rc.0~12944^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=5c1eeb2464f56848ef955dfcf2beeb1cfbf70570;p=lhc%2Fweb%2Fwiklou.git Normalize "\r" newlines in preSaveTransform The behavior of the different preprocessors differs when given \r or \r\n newlines. We already normalize the latter here, so may as well do the former here too. Bug: T78488 Change-Id: Id6390f64a73ea01088729f25d79103388c1fe7e8 --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 5c8253a0c3..a9daa22309 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -4862,6 +4862,7 @@ class Parser { $pairs = array( "\r\n" => "\n", + "\r" => "\n", ); $text = str_replace( array_keys( $pairs ), array_values( $pairs ), $text ); if ( $options->getPreSaveTransform() ) {