diff --git a/token.install b/token.install
index 820fbb2..525c720 100644
--- a/token.install
+++ b/token.install
@@ -18,7 +18,7 @@ function token_requirements($phase = 'runtime') {
     foreach ($token_problems as $problem_key => $problem) {
       if (!empty($problem['problems'])) {
         $problems = array_unique($problem['problems']);
-        $problems = array_map('\Drupal\Component\Utility\SafeMarkup::checkPlain', $problems);
+        $problems = array_map('\Drupal\Component\Utility\Html', $problems);
 
         $build = [
           '#theme' => 'item_list',
diff --git a/token.tokens.inc b/token.tokens.inc
index f38955a..e0bbc7b 100644
--- a/token.tokens.inc
+++ b/token.tokens.inc
@@ -9,7 +9,6 @@ use Drupal\Core\Field\BaseFieldDefinition;
 use Drupal\Core\Render\BubbleableMetadata;
 use Drupal\Core\Render\Element;
 use Drupal\Component\Utility\Crypt;
-use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\Xss;
@@ -107,7 +106,7 @@ function token_token_info_alter(&$info) {
     /* @var \Drupal\system\Entity\DateFormat $date_format_type_info */
     if (!isset($info['tokens']['date'][$date_format_type])) {
       $info['tokens']['date'][$date_format_type] = array(
-        'name' => SafeMarkup::checkPlain($date_format_type_info->label()),
+        'name' => Html::escape($date_format_type_info->label()),
         'description' => t("A date in '@type' format. (%date)", array('@type' => $date_format_type, '%date' => format_date(REQUEST_TIME, $date_format_type))),
         'module' => 'token',
       );
@@ -1224,7 +1223,7 @@ function field_token_info_alter(&$info) {
       }
 
       $info['tokens'][$token_type][$field_name] = array(
-        'name' => SafeMarkup::checkPlain($label),
+        'name' => Html::escape($label),
         'description' => $description,
         'module' => 'token',
       );
