From 9e1ed8d436a0b73c5985fb14b904a9336ea0be7a Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sat, 5 Sep 2009 06:45:38 +0000 Subject: [PATCH] use UtfNormal::cleanUp() (r55768) --- includes/DjVuImage.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/DjVuImage.php b/includes/DjVuImage.php index 942d194d0b..544a455bdf 100644 --- a/includes/DjVuImage.php +++ b/includes/DjVuImage.php @@ -251,9 +251,7 @@ 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 = UtfNormal::cleanUp( $txt ); $txt = preg_replace( "/[\013\035\037]/", "", $txt ); $txt = htmlspecialchars($txt); $txt = preg_replace( "/\((page\s[\d-]*\s[\d-]*\s[\d-]*\s[\d-]*\s*\"([^<]*?)\"\s*|)\)/s", "", $txt ); -- 2.20.1