From: ThomasV Date: Sat, 5 Sep 2009 06:45:38 +0000 (+0000) Subject: use UtfNormal::cleanUp() (r55768) X-Git-Tag: 1.31.0-rc.0~39913 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=9e1ed8d436a0b73c5985fb14b904a9336ea0be7a;p=lhc%2Fweb%2Fwiklou.git use UtfNormal::cleanUp() (r55768) --- 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 );