With some add-on modules, one is able to create a "placeholder" menu item whose path ends up being "javascript:void(0)", which breaks the current logic for creating menu-items classes.

I propose to use the Drupal 7's in-built drupal_clean_css_identifier drupal_html_class which will take care of stripping out everything except plain text.

Patch to follow in first comment.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jwilson3’s picture

Status: Active » Needs review
FileSize
1.29 KB
jwilson3’s picture

Just realized there's an even better solution, that converts to lowercase.

xiukun.zhou’s picture

Thanks a lot to jwilson3 .This is a very good patch

It's more time this got committed and I went ahead and had this rolled at: 7.x-2.x: 19949d3.

Marking this as fixed.

Please let me know if you would have any other questions, comments, issues or concerns on any of these changes, I would be glad to provide more information.
Thanks again to everyne for the help and great work on this issue.

Cheers!

xiukun.zhou’s picture

Status: Needs review » Fixed
jwilson3’s picture

thanks for including this :)

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Use drupal_html_class() for menu-path class instead of drupal_clean_css_identifier()