WordPress.org

Make WordPress Core

Changeset 32906


Ignore:
Timestamp:
06/22/15 20:54:31 (21 months ago)
Author:
wonderboymusic
Message:

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

Props ryan, obenland.
Fixes #23150.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/bookmark-template.php

    r32568 r32906  
    215215    $output = ''; 
    216216 
     217    if ( ! is_array( $r['class'] ) ) { 
     218        $r['class'] = explode( ' ', $r['class'] ); 
     219    } 
     220    $r['class'] = array_map( 'sanitize_html_class', $r['class'] ); 
     221    $r['class'] = trim( join( ' ', $r['class'] ) ); 
     222 
    217223    if ( $r['categorize'] ) { 
    218224        $cats = get_terms( 'link_category', array( 
Note: See TracChangeset for help on using the changeset viewer.