From 87401a6d3431e13d341ab028793b8da5006e21d1 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 5 Mar 2005 14:03:11 +0000 Subject: [PATCH] * Run UTF-8 validation on old text in Recentchanges RSS diffs --- includes/SpecialRecentchanges.php | 7 +++++++ 1 file changed, 7 insertions(+) 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 ) { -- 2.20.1