Gerrit Patch Uploader has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/392475 )
Change subject: Make wfEscapeWikiText() escape "!" at beginning of line
......................................................................
Make wfEscapeWikiText() escape "!" at beginning of line
Exclamation point "!" is part of the table syntax.
Bug: T168763
Change-Id: I1d6ff50bd6178f36d4f29256aeb3040d3f636217
---
M includes/GlobalFunctions.php
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/75/392475/1
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index bb1951d..0427436 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1746,7 +1746,10 @@
}
$repl2 = $repl2 ? '/\b(' . implode( '|', $repl2 ) . '):/i' :
'/^(?!)/';
}
- $text = substr( strtr( "\n$text", $repl ), 1 );
+ $text = "\n$text";
+ $text = strtr( $text, $repl );
+ $text = preg_replace( '/([\r\n][ \t]*)!/', '$1!', $text );
+ $text = substr( $text, 1 );
$text = preg_replace( $repl2, '$1:', $text );
return $text;
}
--
To view, visit https://gerrit.wikimedia.org/r/392475
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d6ff50bd6178f36d4f29256aeb3040d3f636217
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Vlakoff <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits