follow-up to r55768
authorThomasV <thomasv@users.mediawiki.org>
Fri, 4 Sep 2009 13:08:44 +0000 (13:08 +0000)
committerThomasV <thomasv@users.mediawiki.org>
Fri, 4 Sep 2009 13:08:44 +0000 (13:08 +0000)
includes/DjVuImage.php

index c49971e..942d194 100644 (file)
@@ -251,7 +251,9 @@ class DjVuImage {
                        wfProfileOut( 'djvutxt' );
                        if( $retval == 0) {
                                # Get rid of invalid UTF-8, strip control characters
+                               wfSuppressWarnings();
                                $txt = iconv( "UTF-8","UTF-8//IGNORE", $txt );
+                               wfRestoreWarnings();
                                $txt = preg_replace( "/[\013\035\037]/", "", $txt );
                                $txt = htmlspecialchars($txt);
                                $txt = preg_replace( "/\((page\s[\d-]*\s[\d-]*\s[\d-]*\s[\d-]*\s*\&quot;([^<]*?)\&quot;\s*|)\)/s", "<PAGE value=\"$2\" />", $txt  );