[wp-trac] Re: [WordPress Trac] #8446: post_class() outputs invalid css class

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 30 00:10:56 GMT 2009


#8446: post_class() outputs invalid css class
--------------------------+-------------------------------------------------
 Reporter:  lilyfan       |       Owner:  nbachiyski 
     Type:  defect (bug)  |      Status:  new        
 Priority:  high          |   Milestone:  2.8        
Component:  i18n          |     Version:  2.7        
 Severity:  major         |    Keywords:  needs-patch
--------------------------+-------------------------------------------------

Comment(by hakre):

 I have problems with making assumptions based on own criteria. Even if
 only 1% of WordPress users are actually Authors of their CSS, well, ... .

 As this was requested in trac I took quite some time and analysis to find
 a good solution. The patch provides correctly encoded classnames based on
 WP Post Slugs. This really comes in handy. It provides IDs as well. This a
 solution that works very broad and is standard compliant.

 As for the generality of a clean_css_classnames() function, it must deal
 with all possibility according to the definitions. split_utf8() is a
 helper function sothat clean_css_classnames() can do its job.

 you can for shure in contrast reduce wordpress to ascii 7bit. but i
 assume, this is not intended by the wordpress core devs. so if the way
 leads to utf-8 and you need a function to clean css classnames, there it
 is. or should this run into the same dilemma as with clean_url()?.

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


More information about the wp-trac mailing list