Majr has uploaded a new change for review. https://gerrit.wikimedia.org/r/306327
Change subject: WebRequest: Use TextContent::normalizeLineEndings ...................................................................... WebRequest: Use TextContent::normalizeLineEndings Follows up 85034abca5fa. `getText` will now also normalise `\r` to `\n` (which it should've already been doing?), and will trim trailing spaces. I can't see any obvious usages where this would be a problem. Change-Id: I11fb32284a34139279a3b6e903210ba186e76f8a --- M includes/EditPage.php M includes/WebRequest.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/27/306327/1 diff --git a/includes/EditPage.php b/includes/EditPage.php index 738eaec..b9a8def 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -4182,7 +4182,7 @@ * @return string */ protected function safeUnicodeInput( $request, $field ) { - $text = rtrim( $request->getText( $field ) ); + $text = $request->getText( $field ); return $request->getBool( 'safemode' ) ? $this->unmakeSafe( $text ) : $text; diff --git a/includes/WebRequest.php b/includes/WebRequest.php index b5c57ee..44c0265 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -575,7 +575,7 @@ */ public function getText( $name, $default = '' ) { $val = $this->getVal( $name, $default ); - return str_replace( "\r\n", "\n", $val ); + return TextContent::normalizeLineEndings( $val ); } /** -- To view, visit https://gerrit.wikimedia.org/r/306327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I11fb32284a34139279a3b6e903210ba186e76f8a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Majr <pub...@matt-russell.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits