I have an example where my parent mlid is 'main-menu:48'. This is not a valid CSS class name and in template_preprocess_menu_block_wrapper this is put straight in.

I propose that the ':' should be replaced with a '-' to make it a valid CSS identifier.

Members fund testing for the Drupal project. Drupal Association Learn more


superspring’s picture

Status: Active » Needs review
852 bytes

This patch addresses the issue by replacing any occurance of ':' with a '-' for the class name only.

othermachines’s picture

Issue summary: View changes
703 bytes

This makes sense to me. Since the ':' renders the class name invalid, I can't see how making this change would cause any conflicts. Here's a re-roll with project-relative paths.

  • Commit 16cf279 on 7.x-2.x by Dave Reid:
    Issue #1977108 by Dave Reid, othermachines, superspring: Fixed CSS class...
Dave Reid’s picture

Status: Needs review » Fixed

Committed a modified version using drupal_clean_css_identifier().

Status: Fixed » Closed (fixed)

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