Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If there are leading, trailing or double spaces, they will considered as class because of explode(' ', ' class-2 class-6'). Spaces should be trimmed and stripped or empty classes just ignored.
Comment | File | Size | Author |
---|---|---|---|
#1 | menu_attributes-no-empty-class-1761804-1.patch | 1019 bytes | osopolar |
Comments
Comment #1
osopolarComment #2
osopolarComment #3
quicksketchA simpler way of handling this problem is wrapping the explode() call in array_filter():
Comment #4
amateescu CreditAttribution: amateescu commentedCommitted a fix to 7.x-1.x. Thanks for catching this :)
http://drupalcode.org/project/menu_attributes.git/commitdiff/38cb713