dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a91136
)
Normalize "\r" newlines in preSaveTransform
author
Brad Jorsch
<bjorsch@wikimedia.org>
Mon, 15 Dec 2014 21:59:42 +0000
(16:59 -0500)
committer
Brad Jorsch
<bjorsch@wikimedia.org>
Mon, 15 Dec 2014 21:59:42 +0000
(16:59 -0500)
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
includes/parser/Parser.php
patch
|
blob
|
history
diff --git
a/includes/parser/Parser.php
b/includes/parser/Parser.php
index
5c8253a
..
a9daa22
100644
(file)
--- 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() ) {