#6069 closed defect (bug) (fixed)
bp_core_fetch_avatar() no longer allows multiple classes to be passed to it
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-patch commit |
Cc: |
Description
Because BP trunk uses sanitize_html_class( $params['class'] )
, avatars can no longer be created with multiple classes. It used to be the case that one could define $avatar_options = array ( 'class' => 'first_class second_class' )
, but sanitize_html_class()
concatenates these into a single string, i.e. 'first_classsecond_class'. There's no workaround of passing an array.
Not sure if this is a bug or by design, so leaving Type = bug.
Attachments (2)
Change History (9)
#3
@
10 years ago
- Keywords needs-unit-tests added
6069.patch looks good. Would be nice to see a unit test or two, at least for the array regression.
#4
@
10 years ago
- Keywords needs-unit-tests removed
Thanks for your feedback boonebgorges 6069.unittests.patch checks no value, "space separated" value and an array of classes.
The relevant change was r9125 and this appears to be a consequence of some added sanitisation. If you were using it as an array, there must be other people who were, so I'm suggesting we need to fix this for 2.2.