[wp-trac] Re: [WordPress Trac] #8446: Using Slug-Data in CSS Classes does not work

WordPress Trac wp-trac at lists.automattic.com
Mon May 25 10:06:11 GMT 2009


#8446: Using Slug-Data in CSS Classes does not work
-------------------------------------+--------------------------------------
 Reporter:  lilyfan                  |        Owner:  westi   
     Type:  defect (bug)             |       Status:  reopened
 Priority:  high                     |    Milestone:  2.8     
Component:  i18n                     |      Version:  2.7     
 Severity:  major                    |   Resolution:          
 Keywords:  has-patch tested commit  |  
-------------------------------------+--------------------------------------
Changes (by hakre):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 If you are really after a solution (not creating more and more defects)
 you can find a lot of information here:
 http://codex.wordpress.org/User:Hakre/slugs_to_css_classnames (Slugs to
 CSS Classnames).

 Within one of my previous patches you find a function that properly
 handles UTF-8 css classnames. That is working perfectly for any language
 (!). The Argument against using the patch was the overhead of an
 additional function.

 Now an additional function has been added for filtering / hooking. So the
 argumentation starts to get looped.

 If you are after solving this problem without any defects, please consider
 to look into one of my previous patches.

 Using the ID Values (numerical) was getting the bug (it's not a defect,
 don't be so ASCII 7bit centric and even there, it had flaws) out. If the
 old code would have considered the standards, we would not have this
 anyway.

 So after all this discussion, i must add some more input: Consider having
 both in: ID and Slugs, the IDs marked as such as well as the slugs
 properly written (means: UTF-8 encoded).

 If you feel that my code is an overhead, then consider putting the
 functions in sothat other can use it in case this comes in handy. That is
 valid for the "this thene does it that way"-argument.

 As said, I put a lot of effort into it to really solve that problem. ID is
 an easy solution with no overhead. But if anyone wants to have Slugs in as
 well then it should done right.

 Imagine: If you filter slugs and the full slug is iri-encoded, duplicates
 are possible. With IDs you find at least a workaround. That comes in handy
 in the concrete installation.

 As well as IDs, Slugs are still user generated values. The argumentation
 that Slugs will work better is a limited argument. Anyway it is a valid
 one but only if Slugs are transposed the right way into XHTML/UTF-8.

 No-one needs a buggy implementation with defects. My 2 cents.

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


More information about the wp-trac mailing list