r100969 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100968‎ | r100969 | r100970 >
Date:12:50, 27 October 2011
Author:liangent
Status:ok
Tags:
Comment:
Normalize newline before exploding by "\n"
Modified paths:
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewDiff.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewDiff.php
@@ -308,10 +308,10 @@
309309
310310 function getMultiLineRow( $msg, $old, $new ) {
311311 if ( !is_array( $old ) ) {
312 - $old = explode( "\n", $old );
 312+ $old = explode( "\n", str_replace( "\r", '', $old ) );
313313 }
314314 if ( !is_array( $new ) ) {
315 - $new = explode( "\n", $new );
 315+ $new = explode( "\n", str_replace( "\r", '', $new ) );
316316 }
317317
318318 if ( $old == $new ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r105756Followup r100969: There may be Mac newlines as well.liangent08:40, 10 December 2011

Status & tagging log