[buddypress-trac] [BuddyPress Trac] #6679: Allow bp_field_css_class() to accept more than one class name.

buddypress-trac noreply at wordpress.org
Fri Oct 23 00:25:42 UTC 2015


#6679: Allow bp_field_css_class() to accept more than one class name.
----------------------------------+------------------------------
 Reporter:  dcavins               |       Owner:  dcavins
     Type:  enhancement           |      Status:  accepted
 Priority:  normal                |   Milestone:  Awaiting Review
Component:  Component - XProfile  |     Version:  2.3.3
 Severity:  normal                |  Resolution:
 Keywords:  has-patch             |
----------------------------------+------------------------------
Changes (by dcavins):

 * cc: dcavins (added)
 * owner:   => dcavins
 * status:  new => accepted


Comment:

 Thanks for your comments! Looks like a similar bug was squashed here:
 https://buddypress.trac.wordpress.org/ticket/6069.

 @sbrajesh thanks for your comments and the reference. Is there an
 advantage to using `preg_split( '#\s+#', $class );` (as WP does in the
 file your referenced) instead of `explode( ' ', $class )`? (Are there
 cases I can include in my tests that would demonstrate that?)

 On 6069, @imath used `sanitize_html_class()` as the callback, which seems
 like the right choice:
 https://developer.wordpress.org/reference/functions/sanitize_html_class/

 @hnla I agree that being on the lookout for this stuff is useful and will
 poke around for other similar situations.

 Thanks again for the comments; I really appreciate the feedback.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6679#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list