mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PdfHandler
synced 2024-09-23 18:30:34 +00:00
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:
parent
2976e57446
commit
aefde7909b
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue