WordPress.org

Make WordPress Core

Ticket #7559: 7559.2.diff

File 7559.2.diff, 1.0 KB (added by Denis-de-Bernardy, 6 years ago)
  • wp-includes/default-filters.php

     
    1313 */ 
    1414 
    1515// Strip, trim, kses, special chars for string saves 
    16 $filters = array('pre_term_name', 'pre_comment_author_name', 'pre_link_name', 'pre_link_target', 
     16$filters = array('pre_comment_author_name', 'pre_link_target', 
    1717        'pre_link_rel', 'pre_user_display_name', 'pre_user_first_name', 'pre_user_last_name', 
    1818        'pre_user_nickname'); 
    1919foreach ( $filters as $filter ) { 
     
    2323        add_filter($filter, 'wp_specialchars', 30); 
    2424} 
    2525 
     26$filters = array('pre_term_name', 'pre_link_name'); 
     27foreach ( $filters as $filter ) { 
     28        add_filter($filter, 'wp_specialchars'); 
     29        add_filter($filter, 'trim'); 
     30        add_filter($filter, 'wp_filter_kses'); 
     31} 
     32 
    2633// Kses only for textarea saves 
    2734$filters = array('pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description'); 
    2835foreach ( $filters as $filter ) {