diff --git a/core/lib/Drupal/Component/Utility/Html.php b/core/lib/Drupal/Component/Utility/Html.php index cb41775..fb5234e 100644 --- a/core/lib/Drupal/Component/Utility/Html.php +++ b/core/lib/Drupal/Component/Utility/Html.php @@ -82,6 +82,9 @@ public static function cleanCssIdentifier($identifier, array $filter = array( '[' => '-', ']' => '' )) { + // We could also use strtr() here but its much slower than str_replace(). In + // order to keep '__' to stay '__' we first replace it with a different + // placeholder. $identifier = str_replace('__', '##', $identifier); $identifier = str_replace(array_keys($filter), array_values($filter), $identifier); $identifier = str_replace('##', '__', $identifier);