Drupal 7 has three new functions for cleaning CSS classes and IDs, drupal_html_class(), drupal_html_id() and drupal_clean_css_identifier(). See
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.