From: Brion Vibber Date: Sat, 5 Mar 2005 14:03:11 +0000 (+0000) Subject: * Run UTF-8 validation on old text in Recentchanges RSS diffs X-Git-Tag: 1.5.0alpha1~673 X-Git-Url: http://git.cyclocoop.org//%22%22._DIR_PLUGIN_FULLCALENDAR.%22prive/themes/spip/images/event_edit.png/%22?a=commitdiff_plain;h=87401a6d3431e13d341ab028793b8da5006e21d1;p=lhc%2Fweb%2Fwiklou.git * Run UTF-8 validation on old text in Recentchanges RSS diffs --- diff --git a/includes/SpecialRecentchanges.php b/includes/SpecialRecentchanges.php index 0df8788feb..0baca6166f 100644 --- a/includes/SpecialRecentchanges.php +++ b/includes/SpecialRecentchanges.php @@ -371,6 +371,13 @@ function rcFormatDiff( $row ) { } $oldtext = $oldrev->getText(); + global $wgUseLatin1; + if( !$wgUseLatin1 ) { + # Old entries may contain illegal characters + # which will damage output + $oldtext = UtfNormal::cleanUp( $oldtext ); + } + global $wgFeedDiffCutoff; if( strlen( $newtext ) > $wgFeedDiffCutoff || strlen( $oldtext ) > $wgFeedDiffCutoff ) {