[wp-trac] [WordPress Trac] #11722: body_class() creates an invalid class when page template contains a . [full stop]

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 5 14:17:38 UTC 2010


#11722: body_class() creates an invalid class when page template contains a . [full
stop]
--------------------------+-------------------------------------------------
 Reporter:  willmot       |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  low           |   Milestone:  3.0      
Component:  Template      |     Version:  3.0      
 Severity:  minor         |    Keywords:  has-patch
--------------------------+-------------------------------------------------

Comment(by willmot):

 post-template.2.diff

 This patch would be safer for backwards compatibility and is also prettier
 for my specific case as the template.contact.php becomes template-contact-
 php instead of templatecontactphp.

 It would be nice if sanitize_html_class replaced some characters with
 hyphens and removed others, perhaps by pushing the string through
 sanitize_title first?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11722#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list