Migrate away from UtfNormal in core to external UtfNormal library

In MediaWiki version 1.25, the UtfNormal library was split into a separate wikimedia/utfnormal package.
This patch changes the code to reflect this change.

Bug: T153994
Change-Id: If4044c38756f96d123cea105312a1863d8b17053
This commit is contained in:
MtDu 2017-01-06 07:55:20 -06:00
parent 2976e57446
commit aefde7909b

View file

@ -20,6 +20,7 @@
*/
use MediaWiki\Logger\LoggerFactory;
use UtfNormal\Validator;
/**
* inspired by djvuimage from Brion Vibber
@ -140,7 +141,7 @@ class PdfImage {
foreach( $pages as $page => $pageText ) {
# Get rid of invalid UTF-8, strip control characters
# Note we need to do this per page, as \f page feed would be stripped.
$pages[$page] = UtfNormal::cleanUp( $pageText );
$pages[$page] = Validator::cleanUp( $pageText );
}
$data['text'] = $pages;
}