[wp-trac] [WordPress Trac] #30883: Duplicate post_class() for different categories

WordPress Trac noreply at wordpress.org
Fri Jan 2 00:42:35 UTC 2015


#30883: Duplicate post_class() for different categories
-------------------------------------------------+-------------------------
 Reporter:  SergeyBiryukov                       |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  4.2
Component:  Posts, Post Types                    |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug needs-patch needs-    |     Focuses:
  unit-tests                                     |
-------------------------------------------------+-------------------------

Comment (by sgrant):

 Hiya! I took a crack at this. Added a new conditional in
 sanitize_html_class, and added three unit tests relating to the fallback
 in a new file (seems to fit the formatting unit test structure). This
 should swap any remaining sanitized string to the fallback if it only
 consists of hyphens. Patch attached. Thanks!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30883#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list