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_identifierdrupal_html_class which will take care of stripping out everything except plain text.
Patch to follow in first comment.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | nice_menus-clean-css-class-1710492-2.patch | 1.27 KB | jwilson3 |
| #1 | nice_menus-clean-css-class-1710492.patch | 1.29 KB | jwilson3 |
Comments
Comment #1
jwilson3Comment #2
jwilson3Just realized there's an even better solution, that converts to lowercase.
Comment #3
xiukun.zhou commentedThanks 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!
Comment #4
xiukun.zhou commentedComment #5
jwilson3thanks for including this :)
Comment #6.0
(not verified) commentedUse drupal_html_class() for menu-path class instead of drupal_clean_css_identifier()