diff --git a/core/lib/Drupal/Component/Utility/Xss.php b/core/lib/Drupal/Component/Utility/Xss.php index 4c6e812..5d5ba97 100644 --- a/core/lib/Drupal/Component/Utility/Xss.php +++ b/core/lib/Drupal/Component/Utility/Xss.php @@ -175,7 +175,7 @@ protected static function split($string, $html_tags, $class) { $xhtml_slash = $count ? ' /' : ''; // Clean up attributes. - $attr2 = implode(' ', $class::attributes($attrlist)); + $attr2 = implode(' ', $class::attributes(trim($attrlist))); $attr2 = preg_replace('/[<>]/', '', $attr2); $attr2 = strlen($attr2) ? ' ' . $attr2 : '';