[wp-trac] [WordPress Trac] #51855: wp_dropdown_categories allows multiple classes

WordPress Trac noreply at wordpress.org
Fri Nov 27 16:54:03 UTC 2020


#51855: wp_dropdown_categories allows multiple classes
--------------------------+------------------------------
 Reporter:  tnash         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  2.8
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by tnash):

 Personally I would love to see sanitize_html_class() support multiple
 classes safely.

 However the ticket was raised exactly because of the inconsistencies
 across functions, developers will expect class arguments to behave and be
 escaped the same across functions and indeed a function exists for this
 very usecase so it would make sense to use the stricter purpose built
 function. Alternatively to switch for all functions to use the more
 permissive esc_attr when inserting class.

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


More information about the wp-trac mailing list