Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal 7 has three new functions for cleaning CSS classes and IDs, drupal_html_class(), drupal_html_id() and drupal_clean_css_identifier(). See #464862: Add drupal_css_class() to clean class names and rename form_clean_id
We should replace Zen's zen_id_safe() with drupal_html_class() and drupal_html_id().
Of course the namespace is problematic. Zen shouldn't be defining functions that start with "drupal_", but we'll conditionally define them in case some other module decides to be just as "evil" as Zen and (re)defines them somewhere else.
Comments
Comment #1
JohnAlbinFixed.