WordPress.org

Make WordPress Core

Ticket #31690: 31690.diff

File 31690.diff, 594 bytes (added by westonruter, 7 years ago)

https://github.com/xwp/wordpress-develop/pull/78

  • src/wp-includes/default-widgets.php

    diff --git src/wp-includes/default-widgets.php src/wp-includes/default-widgets.php
    index 1a73985..748fc9a 100644
    class WP_Widget_Text extends WP_Widget { 
    533533                        $instance['text'] =  $new_instance['text'];
    534534                else
    535535                        $instance['text'] = stripslashes( wp_filter_post_kses( addslashes($new_instance['text']) ) ); // wp_filter_post_kses() expects slashed
    536                 $instance['filter'] = isset($new_instance['filter']);
     536                $instance['filter'] = ! empty( $new_instance['filter'] );
    537537                return $instance;
    538538        }
    539539