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

JohnAlbin’s picture

Title: Replace zen_id_safe with drupal_html_class and drupal_html_id » Replace zen_id_safe() with drupal_html_class() and drupal_html_id()
Status: Active » Fixed

Fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.