Ticket #7375: 7375.diff

File 7375.diff, 1.4 KB (added by ryan, 4 years ago)
  • wp-includes/widgets.php

     
    11251125                        if ( empty($title) ) 
    11261126                                $title = __('Untitled'); 
    11271127                        $desc = ''; 
    1128                                 if ( isset( $item['description'] ) && is_string( $item['description'] ) ) 
    1129                                         $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['description'], ENT_QUOTES)))); 
    1130                                 elseif ( isset( $item['summary'] ) && is_string( $item['summary'] ) ) 
    1131                                         $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['summary'], ENT_QUOTES)))); 
    1132  
    11331128                        $summary = ''; 
    11341129                        if ( isset( $item['description'] ) && is_string( $item['description'] ) ) 
    1135                                 $summary = $item['description']; 
     1130                                $desc = $summary = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['description'], ENT_QUOTES)))); 
    11361131                        elseif ( isset( $item['summary'] ) && is_string( $item['summary'] ) ) 
    1137                                 $summary = $item['summary']; 
     1132                                $desc = $summary = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['summary'], ENT_QUOTES)))); 
    11381133 
    1139                         $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($summary, ENT_QUOTES)))); 
    1140  
    11411134                        if ( $show_summary ) { 
    11421135                                $desc = ''; 
    11431136                                $summary = wp_specialchars( $summary );