Make WordPress Core


Ignore:
Timestamp:
05/21/2018 12:42:49 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Widgets: Allow basic inline tags in wp_sidebar_description().

The customizer has allowed HTML in sidebar descriptions since adding support for sidebars. This change ensures that basic HTML is also allowed for them in the widgets admin screen.

Props flixos90.
Merges [43275] to the 4.9 branch.
Fixes #42608.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/widgets.php

    r42375 r43302  
    421421    global $wp_registered_sidebars;
    422422
    423     if ( isset($wp_registered_sidebars[$id]['description']) )
    424         return esc_html( $wp_registered_sidebars[$id]['description'] );
     423    if ( isset( $wp_registered_sidebars[ $id ]['description'] ) ) {
     424        return wp_kses( $wp_registered_sidebars[ $id ]['description'], 'sidebar_description' );
     425    }
    425426}
    426427
Note: See TracChangeset for help on using the changeset viewer.