diff --git a/core/modules/file/file.field.inc b/core/modules/file/file.field.inc
index 3252cec..886de25 100644
--- a/core/modules/file/file.field.inc
+++ b/core/modules/file/file.field.inc
@@ -196,7 +196,7 @@ function theme_file_upload_help($variables) {
     $descriptions[] = t('!size limit.', array('!size' => format_size($upload_validators['file_validate_size'][0])));
   }
   if (isset($upload_validators['file_validate_extensions'])) {
-    $descriptions[] = t('Allowed types: !extensions.', array('!extensions' => check_plain($upload_validators['file_validate_extensions'][0])));
+    $descriptions[] = t('Allowed types: !extensions.', array('!extensions' => Drupal\Component\Utility\String::checkPlain($upload_validators['file_validate_extensions'][0])));
   }
 
   if (isset($upload_validators['file_validate_image_resolution'])) {
diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index f4e0f62..bb278c7 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -1018,15 +1018,15 @@ function file_tokens($type, $tokens, array $data = array(), array $options = arr
 
         // Essential file data
         case 'name':
-          $replacements[$original] = $sanitize ? check_plain($file->getFilename()) : $file->getFilename();
+          $replacements[$original] = $sanitize ? Drupal\Component\Utility\String::checkPlain($file->getFilename()) : $file->getFilename();
           break;
 
         case 'path':
-          $replacements[$original] = $sanitize ? check_plain($file->getFileUri()) : $file->getFileUri();
+          $replacements[$original] = $sanitize ? Drupal\Component\Utility\String::checkPlain($file->getFileUri()) : $file->getFileUri();
           break;
 
         case 'mime':
-          $replacements[$original] = $sanitize ? check_plain($file->getMimeType()) : $file->getMimeType();
+          $replacements[$original] = $sanitize ? Drupal\Component\Utility\String::checkPlain($file->getMimeType()) : $file->getMimeType();
           break;
 
         case 'size':
@@ -1034,7 +1034,7 @@ function file_tokens($type, $tokens, array $data = array(), array $options = arr
           break;
 
         case 'url':
-          $replacements[$original] = $sanitize ? check_plain(file_create_url($file->getFileUri())) : file_create_url($file->getFileUri());
+          $replacements[$original] = $sanitize ? Drupal\Component\Utility\String::checkPlain(file_create_url($file->getFileUri())) : file_create_url($file->getFileUri());
           break;
 
         // These tokens are default variations on the chained tokens handled below.
@@ -1048,7 +1048,7 @@ function file_tokens($type, $tokens, array $data = array(), array $options = arr
 
         case 'owner':
           $name = $file->getOwner()->label();
-          $replacements[$original] = $sanitize ? check_plain($name) : $name;
+          $replacements[$original] = $sanitize ? Drupal\Component\Utility\String::checkPlain($name) : $name;
           break;
       }
     }
@@ -1596,7 +1596,7 @@ function theme_file_link($variables) {
   }
   else {
     $link_text = $variables['description'];
-    $options['attributes']['title'] = check_plain($file->getFilename());
+    $options['attributes']['title'] = Drupal\Component\Utility\String::checkPlain($file->getFilename());
   }
 
   $file_icon = array(
@@ -1624,7 +1624,7 @@ function theme_file_icon($variables) {
   $file = $variables['file'];
   $icon_directory = $variables['icon_directory'];
 
-  $mime = check_plain($file->getMimeType());
+  $mime = Drupal\Component\Utility\String::checkPlain($file->getMimeType());
   $icon_url = file_icon_url($file, $icon_directory);
   return '<img class="file-icon" alt="" title="' . $mime . '" src="' . $icon_url . '" />';
 }
