diff --git a/src/Controller/FeedController.php b/src/Controller/FeedController.php
index f3f8255..65f445c 100644
--- a/src/Controller/FeedController.php
+++ b/src/Controller/FeedController.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\feeds\Controller;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\Url;
 use Drupal\feeds\FeedInterface;
@@ -56,7 +56,7 @@ class FeedController extends ControllerBase {
       }
       $build['#rows'][] = [
         $this->l($feed_type->label(), new Url('feeds.add', ['feeds_feed_type' => $feed_type->id()])),
-        String::checkPlain($feed_type->getDescription()),
+        SafeMarkup::checkPlain($feed_type->getDescription()),
       ];
     }
 
diff --git a/src/Controller/ItemListController.php b/src/Controller/ItemListController.php
index aab9f30..6b93e47 100644
--- a/src/Controller/ItemListController.php
+++ b/src/Controller/ItemListController.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\feeds\Controller;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\feeds\FeedInterface;
@@ -71,12 +71,12 @@ class ItemListController extends ControllerBase {
       $row[] = $this->t('@time ago', ['@time' => $ago]);
       // Item GUID.
       $row[] = [
-        'data' => String::checkPlain(Unicode::truncate($entity->get('feeds_item')->guid, 30, FALSE, TRUE)),
+        'data' => SafeMarkup::checkPlain(Unicode::truncate($entity->get('feeds_item')->guid, 30, FALSE, TRUE)),
         'title' => $entity->get('feeds_item')->guid,
       ];
       // Item URL.
       $row[] = [
-        'data' => String::checkPlain(Unicode::truncate($entity->get('feeds_item')->url, 30, FALSE, TRUE)),
+        'data' => SafeMarkup::checkPlain(Unicode::truncate($entity->get('feeds_item')->url, 30, FALSE, TRUE)),
         'title' => $entity->get('feeds_item')->url,
       ];
 
diff --git a/src/Entity/Feed.php b/src/Entity/Feed.php
index 12ea8d3..0939f56 100644
--- a/src/Entity/Feed.php
+++ b/src/Entity/Feed.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\feeds\Entity;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Entity\ContentEntityBase;
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\Core\Entity\EntityTypeInterface;
@@ -391,7 +391,7 @@ class Feed extends ContentEntityBase implements FeedInterface {
   public function lock() {
     if (!\Drupal::service('lock.persistent')->acquire("feeds_feed_{$this->id()}", 3600 * 12)) {
       $args = ['@id' => $this->bundle(), '@fid' => $this->id()];
-      throw new LockException(String::format('Cannot acquire lock for feed @id / @fid.', $args));
+      throw new LockException(SafeMarkup::format('Cannot acquire lock for feed @id / @fid.', $args));
     }
   }
 
diff --git a/src/Entity/FeedType.php b/src/Entity/FeedType.php
index eaf7b22..b5106a9 100644
--- a/src/Entity/FeedType.php
+++ b/src/Entity/FeedType.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\feeds\Entity;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\Core\Entity\EntityWithPluginCollectionInterface;
@@ -387,7 +387,7 @@ class FeedType extends ConfigEntityBundleBase implements FeedTypeInterface, Enti
 
     $options = [];
     foreach ($manager->getDefinitions() as $id => $definition) {
-      $options[$id] = String::checkPlain($definition['title']);
+      $options[$id] = SafeMarkup::checkPlain($definition['title']);
     }
 
     return $options;
diff --git a/src/Exception/TargetValidationException.php b/src/Exception/TargetValidationException.php
index dcf62cb..f647981 100644
--- a/src/Exception/TargetValidationException.php
+++ b/src/Exception/TargetValidationException.php
@@ -6,7 +6,7 @@
 
 namespace Drupal\feeds\Exception;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 
 /**
  * Thrown if the target values are invalid and cannot be recovered.
@@ -37,7 +37,7 @@ class TargetValidationException extends \RuntimeException {
    */
   public function __construct($message = '', array $args = []) {
     $this->messageString = $message;
-    $this->message = String::format($message, $args);
+    $this->message = SafeMarkup::format($message, $args);
     $this->args = $args;
     $this->code = 0;
   }
diff --git a/src/FeedListBuilder.php b/src/FeedListBuilder.php
index 6c99405..c0ee230 100644
--- a/src/FeedListBuilder.php
+++ b/src/FeedListBuilder.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\feeds;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Datetime\DateFormatter;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityListBuilder;
@@ -93,7 +93,7 @@ class FeedListBuilder extends EntityListBuilder {
       '#title' => $entity->label(),
     ] + $uri->toRenderArray();
 
-    $row['type'] = String::checkPlain($entity->getType()->label());
+    $row['type'] = SafeMarkup::checkPlain($entity->getType()->label());
     $row['author']['data'] = [
       '#theme' => 'username',
       '#account' => $entity->getOwner(),
diff --git a/src/Feeds/Fetcher/Form/DirectoryFetcherForm.php b/src/Feeds/Fetcher/Form/DirectoryFetcherForm.php
index baa86d5..a3261b9 100644
--- a/src/Feeds/Fetcher/Form/DirectoryFetcherForm.php
+++ b/src/Feeds/Fetcher/Form/DirectoryFetcherForm.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\feeds\Feeds\Fetcher\Form;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\StreamWrapper\StreamWrapperInterface;
 use Drupal\Core\StreamWrapper\StreamWrapperManager;
@@ -92,7 +92,7 @@ class DirectoryFetcherForm extends ExternalPluginFormBase {
   protected function getSchemeOptions() {
     $options = [];
     foreach ($this->streamWrapperManager->getDescriptions(StreamWrapperInterface::WRITE_VISIBLE) as $scheme => $description) {
-      $options[$scheme] = String::checkPlain($scheme . ': ' . $description);
+      $options[$scheme] = SafeMarkup::checkPlain($scheme . ': ' . $description);
     }
     return $options;
   }
diff --git a/src/Feeds/Fetcher/UploadFetcher.php b/src/Feeds/Fetcher/UploadFetcher.php
index 22cbed6..f435a3a 100644
--- a/src/Feeds/Fetcher/UploadFetcher.php
+++ b/src/Feeds/Fetcher/UploadFetcher.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\feeds\Feeds\Fetcher;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Component\Uuid\UuidInterface;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Form\FormStateInterface;
@@ -101,7 +101,7 @@ class UploadFetcher extends ConfigurablePluginBase implements FeedPluginFormInte
     }
 
     // File does not exist.
-    throw new \RuntimeException(String::format('Resource is not a file: %source', ['%source' => $feed->getSource()]));
+    throw new \RuntimeException(SafeMarkup::format('Resource is not a file: %source', ['%source' => $feed->getSource()]));
   }
 
   /**
diff --git a/src/Feeds/Parser/CsvParser.php b/src/Feeds/Parser/CsvParser.php
index 3aa60d7..995d8e6 100644
--- a/src/Feeds/Parser/CsvParser.php
+++ b/src/Feeds/Parser/CsvParser.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\feeds\Feeds\Parser;
 
-use Drupal\Component\Utility\String;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\feeds\Component\CsvParser as CsvFileParser;
diff --git a/src/Feeds/Processor/EntityProcessorBase.php b/src/Feeds/Processor/EntityProcessorBase.php
index ed03c34..c9f6b44 100644
--- a/src/Feeds/Processor/EntityProcessorBase.php
+++ b/src/Feeds/Processor/EntityProcessorBase.php
@@ -8,7 +8,7 @@
 namespace Drupal\feeds\Feeds\Processor;
 
 use Doctrine\Common\Inflector\Inflector;
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityManagerInterface;
@@ -315,7 +315,7 @@ abstract class EntityProcessorBase extends ProcessorBase implements EntityProces
       '%error' => $violations[0]->getMessage(),
       '@url' => $this->url('entity.feeds_feed_type.mapping', ['feeds_feed_type' => $this->feedType->id()]),
     ];
-    throw new ValidationException(String::format('The @entity %label failed to validate with the error: %error Please check your <a href="@url">mappings</a>.', $args));
+    throw new ValidationException(SafeMarkup::format('The @entity %label failed to validate with the error: %error Please check your <a href="@url">mappings</a>.', $args));
   }
 
   /**
diff --git a/src/Feeds/Target/EntityReference.php b/src/Feeds/Target/EntityReference.php
index f9843d8..eb59102 100644
--- a/src/Feeds/Target/EntityReference.php
+++ b/src/Feeds/Target/EntityReference.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\feeds\Feeds\Target;
 
-use Drupal\Component\Utility\String as DrupalString;
+use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Entity\Query\QueryFactory;
 use Drupal\Core\Field\FieldDefinitionInterface;
@@ -82,7 +82,7 @@ class EntityReference extends FieldTargetBase implements ConfigurableTargetInter
     $field_definitions = array_filter($field_definitions, [$this, 'filterFieldTypes']);
     $options = [];
     foreach ($field_definitions as $id => $definition) {
-      $options[$id] = DrupalString::checkPlain($definition->getLabel());
+      $options[$id] = SafeMarkup::checkPlain($definition->getLabel());
     }
 
     return $options;
diff --git a/src/FeedsEnclosure.php b/src/FeedsEnclosure.php
index f947b14..89ccc17 100644
--- a/src/FeedsEnclosure.php
+++ b/src/FeedsEnclosure.php
@@ -10,7 +10,7 @@
 
 namespace Drupal\feeds;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 
 /**
  * Enclosure element, can be part of the result array.
@@ -74,7 +74,7 @@ class FeedsEnclosure {
         '%url' => $this->uri,
         '@code' => $response->getStatusCode(),
       ];
-      throw new \RuntimeException(String::format('Download of %url failed with code @code.', $args));
+      throw new \RuntimeException(SafeMarkup::format('Download of %url failed with code @code.', $args));
     }
 
     return $response->getBody(TRUE);
@@ -149,13 +149,13 @@ class FeedsEnclosure {
         $file = file_save_data($this->getContent(), $destination . $filename, $replace);
       }
       catch (\Exception $e) {
-        watchdog_exception('Feeds', $e, nl2br(String::checkPlain($e)));
+        watchdog_exception('Feeds', $e, nl2br(SafeMarkup::checkPlain($e)));
       }
     }
 
     // We couldn't make sense of this enclosure, throw an exception.
     if (!$file) {
-      throw new \RuntimeException(String::format('Invalid enclosure %enclosure', ['%enclosure' => $this->uri]));
+      throw new \RuntimeException(SafeMarkup::format('Invalid enclosure %enclosure', ['%enclosure' => $this->uri]));
     }
 
     return $file;
diff --git a/src/Form/DeleteMultiple.php b/src/Form/DeleteMultiple.php
index 5dd7408..6f9ed1d 100644
--- a/src/Form/DeleteMultiple.php
+++ b/src/Form/DeleteMultiple.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\feeds\Form;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Form\ConfirmFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Session\AccountInterface;
@@ -117,7 +117,7 @@ class DeleteMultiple extends ConfirmFormBase {
     $form['feeds'] = [
       '#theme' => 'item_list',
       '#items' => array_map(function ($feed) {
-        return String::checkPlain($feed->label());
+        return SafeMarkup::checkPlain($feed->label());
       }, $this->feeds),
     ];
     return parent::buildForm($form, $form_state);
diff --git a/src/Form/MappingForm.php b/src/Form/MappingForm.php
index 8c0ecf3..c6a28f1 100644
--- a/src/Form/MappingForm.php
+++ b/src/Form/MappingForm.php
@@ -9,7 +9,7 @@
 
 namespace Drupal\feeds\Form;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\feeds\FeedTypeInterface;
@@ -165,7 +165,7 @@ class MappingForm extends FormBase {
         '#attributes' => ['class' => ['feeds-table-select-list']],
       ];
 
-      $label = String::checkPlain($this->targets[$mapping['target']]->getLabel());
+      $label = SafeMarkup::checkPlain($this->targets[$mapping['target']]->getLabel());
 
       if (count($mapping['map']) > 1) {
         $label .= ': ' . $this->targets[$mapping['target']]->getPropertyLabel($column);
diff --git a/src/Plugin/Field/FieldFormatter/FeedsUriLinkFormatter.php b/src/Plugin/Field/FieldFormatter/FeedsUriLinkFormatter.php
index 8ba8305..8ce6c7c 100644
--- a/src/Plugin/Field/FieldFormatter/FeedsUriLinkFormatter.php
+++ b/src/Plugin/Field/FieldFormatter/FeedsUriLinkFormatter.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\feeds\Plugin\Field\FieldFormatter;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Field\FieldItemListInterface;
 use Drupal\Core\Field\Plugin\Field\FieldFormatter\UriLinkFormatter;
 use Drupal\Core\Url;
@@ -46,7 +46,7 @@ class FeedsUriLinkFormatter extends UriLinkFormatter {
       }
       else {
         $elements[$delta] = [
-          '#markup' => String::checkPlain($item->value),
+          '#markup' => SafeMarkup::checkPlain($item->value),
         ];
       }
     }
diff --git a/src/Plugin/Type/Target/FieldTargetBase.php b/src/Plugin/Type/Target/FieldTargetBase.php
index e831eda..e27729c 100644
--- a/src/Plugin/Type/Target/FieldTargetBase.php
+++ b/src/Plugin/Type/Target/FieldTargetBase.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\feeds\Plugin\Type\Target;
 
-use Drupal\Component\Utility\String;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\feeds\Exception\EmptyFeedException;
diff --git a/src/Result/FetcherResult.php b/src/Result/FetcherResult.php
index 4e2b212..d1cc67f 100644
--- a/src/Result/FetcherResult.php
+++ b/src/Result/FetcherResult.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\feeds\Result;
 
-use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\SafeMarkup;
 
 /**
  * The default fetcher result object.
@@ -55,11 +55,11 @@ class FetcherResult implements FetcherResultInterface {
    */
   protected function checkFile() {
     if (!file_exists($this->filePath)) {
-      throw new \RuntimeException(String::format('File %filepath does not exist.', ['%filepath' => $this->filePath]));
+      throw new \RuntimeException(SafeMarkup::format('File %filepath does not exist.', ['%filepath' => $this->filePath]));
     }
 
     if (!is_readable($this->filePath)) {
-      throw new \RuntimeException(String::format('File %filepath is not readable.', ['%filepath' => $this->filePath]));
+      throw new \RuntimeException(SafeMarkup::format('File %filepath is not readable.', ['%filepath' => $this->filePath]));
     }
   }
 
@@ -107,7 +107,7 @@ class FetcherResult implements FetcherResultInterface {
     }
 
     if (!is_writable($this->filePath)) {
-      throw new \RuntimeException(String::format('File %filepath is not writable.', ['%filepath' => $this->filePath]));
+      throw new \RuntimeException(SafeMarkup::format('File %filepath is not writable.', ['%filepath' => $this->filePath]));
     }
 
     $contents = file_get_contents($this->filePath);
diff --git a/tests/src/Unit/Element/UriTest.php b/tests/src/Unit/Element/UriTest.php
index adf4f13..52044fd 100644
--- a/tests/src/Unit/Element/UriTest.php
+++ b/tests/src/Unit/Element/UriTest.php
@@ -53,11 +53,11 @@ class UriTest extends FeedsUnitTestCase {
 }
 
 namespace {
-  use Drupal\Component\Utility\String;
+  use Drupal\Component\Utility\SafeMarkup;
 
   if (!function_exists('t')) {
     function t($string, array $args = []) {
-      return String::format($string, $args);
+      return SafeMarkup::format($string, $args);
     }
   }
 
diff --git a/tests/src/Unit/FeedsUnitTestCase.php b/tests/src/Unit/FeedsUnitTestCase.php
index a7d1144..f8ae18c 100644
--- a/tests/src/Unit/FeedsUnitTestCase.php
+++ b/tests/src/Unit/FeedsUnitTestCase.php
@@ -135,7 +135,6 @@ abstract class FeedsUnitTestCase extends UnitTestCase {
 
 namespace {
   use Drupal\Core\Session\AccountInterface;
-  use Drupal\Component\Utility\String;
 
   if (!function_exists('drupal_set_message')) {
     function drupal_set_message() {}
