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:
045f39f
)
Improve wfEscapeWikiText, part 2
author
Brad Jorsch
<bjorsch@wikimedia.org>
Fri, 20 Sep 2013 16:40:17 +0000
(12:40 -0400)
committer
Brad Jorsch
<bjorsch@wikimedia.org>
Fri, 20 Sep 2013 16:51:02 +0000
(12:51 -0400)
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
patch
|
blob
|
history
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
0c92ab6
..
414c822
100644
(file)
--- 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----",
'__' => '__', '://' => '://',
);