Ticket #12480: bmb_0009_t12480.patch

File bmb_0009_t12480.patch, 1.6 KB (added by bumbu, 3 years ago)
  • wp-includes/default-filters.php

     
    128128add_filter( 'comment_text', 'convert_chars'          ); 
    129129add_filter( 'comment_text', 'make_clickable',      9 ); 
    130130add_filter( 'comment_text', 'force_balance_tags', 25 ); 
     131add_filter( 'comment_text', 'fill_empty_links',   24 ); 
    131132add_filter( 'comment_text', 'convert_smilies',    20 ); 
    132133add_filter( 'comment_text', 'wpautop',            30 ); 
    133134 
  • wp-includes/formatting.php

     
    10941094} 
    10951095 
    10961096/** 
     1097 * Adds blank string to all HTML A empty elements in content. 
     1098 * 
     1099 * @since 2.9.2 
     1100 * 
     1101 * @param string $text Content that may contain HTML A elements. 
     1102 * @return string Converted content. 
     1103 */ 
     1104function fill_empty_links($text){ 
     1105        $text = preg_replace_callback('|<a (.+?)>\s*</a>|i', 'fill_empty_links_callback', $text); 
     1106        return $text; 
     1107} 
     1108 
     1109/** 
     1110 * Callback to used to add blank string to HTML A empty element. 
     1111 * 
     1112 * @since 2.9.2 
     1113 * 
     1114 * @param array $matches Single Match 
     1115 * @return string HTML A Element with blank text. 
     1116 */ 
     1117function fill_empty_links_callback( $matches ) { 
     1118        $text = $matches[1]; 
     1119        return "<a $text >blank</a>"; 
     1120} 
     1121 
     1122/** 
    10971123 * Acts on text which is about to be edited. 
    10981124 * 
    10991125 * Unless $richedit is set, it is simply a holder for the 'format_to_edit'