Sanitize the class passed to wp_list_bookmarks() and allow passing an array.

Props ryan, obenland.
Fixes #23150.


git-svn-id: https://develop.svn.wordpress.org/trunk@32906 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-06-22 20:54:31 +00:00
parent 7af8195803
commit 6932a5f558

View File

@ -214,6 +214,12 @@ function wp_list_bookmarks( $args = '' ) {
$output = '';
if ( ! is_array( $r['class'] ) ) {
$r['class'] = explode( ' ', $r['class'] );
}
$r['class'] = array_map( 'sanitize_html_class', $r['class'] );
$r['class'] = trim( join( ' ', $r['class'] ) );
if ( $r['categorize'] ) {
$cats = get_terms( 'link_category', array(
'name__like' => $r['category_name'],