r55843 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55842‎ | r55843 | r55844 >
Date:06:45, 5 September 2009
Author:thomasv
Status:ok
Tags:
Comment:
use UtfNormal::cleanUp() (r55768)
Modified paths:
  • /trunk/phase3/includes/DjVuImage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DjVuImage.php
@@ -251,9 +251,7 @@
252252 wfProfileOut( 'djvutxt' );
253253 if( $retval == 0) {
254254 # Get rid of invalid UTF-8, strip control characters
255 - wfSuppressWarnings();
256 - $txt = iconv( "UTF-8","UTF-8//IGNORE", $txt );
257 - wfRestoreWarnings();
 255+ $txt = UtfNormal::cleanUp( $txt );
258256 $txt = preg_replace( "/[\013\035\037]/", "", $txt );
259257 $txt = htmlspecialchars($txt);
260258 $txt = preg_replace( "/\((page\s[\d-]*\s[\d-]*\s[\d-]*\s[\d-]*\s*\&quot;([^<]*?)\&quot;\s*|)\)/s", "<PAGE value=\"$2\" />", $txt );

Follow-up revisions

RevisionCommit summaryAuthorDate
r61258if available, use iconv because it requires less memory (fixes bug 21809) (fo...thomasv17:23, 19 January 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r55768get rid of invalid UTF8, strip control charactersthomasv14:19, 3 September 2009

Status & tagging log