* Run UTF-8 validation on old text in Recentchanges RSS diffs
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 5 Mar 2005 14:03:11 +0000 (14:03 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 5 Mar 2005 14:03:11 +0000 (14:03 +0000)
includes/SpecialRecentchanges.php

index 0df8788..0baca61 100644 (file)
@@ -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 ) {