diff --git a/core/lib/Drupal/Component/Utility/Html.php b/core/lib/Drupal/Component/Utility/Html.php
index b3893d6845..b7382064de 100644
--- a/core/lib/Drupal/Component/Utility/Html.php
+++ b/core/lib/Drupal/Component/Utility/Html.php
@@ -115,13 +115,16 @@ public static function cleanCssIdentifier($identifier, array $filter = [

     // Valid characters in a CSS identifier are:
     // - the hyphen (U+002D)
+    // - the slash (U+002F)
     // - a-z (U+0030 - U+0039)
+    // - the @ sign (U+0040)
     // - A-Z (U+0041 - U+005A)
     // - the underscore (U+005F)
     // - 0-9 (U+0061 - U+007A)
     // - ISO 10646 characters U+00A1 and higher
     // We strip out any character not in the above list.
-    $identifier = preg_replace('/[^\x{002D}\x{0030}-\x{0039}\x{0041}-\x{005A}\x{005F}\x{0061}-\x{007A}\x{00A1}-\x{FFFF}]/u', '', $identifier);
+    $identifier = preg_replace('/[^\x{002D}\x{002F}-\x{005A}\x{005F}\x{0061}-\x{007A}\x{00A1}-\x{FFFF}]/u', '', $identifier);
+
     // Identifiers cannot start with a digit, two hyphens, or a hyphen followed by a digit.
     $identifier = preg_replace([
       '/^[0-9]/',
