Classes on divs should not have spaces

Sean B Fuller - September 16, 2008 - 21:04
Project:Views 'Group-By' Pack
Version:5.x-1.3
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:needs review
Description

Works great, but we're seeing an issue with the classes on the header and content divs. Our taxonomy terms have spaces in the name ("Upcoming events") so they become hard to select in css. Removing any special characters or spacing when outputting as class names to make it just "Upcomingevents" would be enough to fix this. No time to write a patch now, but I wanted to drop a note about the issue.

#1

jscheel - October 30, 2008 - 17:25
Status:active» needs review

I've attached a patch to fix this. regex taken from the zen theme's zen_id_safe() function

AttachmentSize
issue_309382.patch 1.18 KB

#2

alexanderpas - October 30, 2008 - 17:35

code looks good ;) however, i would like to see the underscore replaced with the - too.

also... if this is not yet in drupal, we need to create a common funtion for this....

 
 

Drupal is a registered trademark of Dries Buytaert.