Ticket #8986: fix_preg_replaces.diff

File fix_preg_replaces.diff, 1.5 KB (added by filosofo, 3 years ago)
  • wp-includes/post-template.php

     
    607607        $current_page = 0; 
    608608 
    609609        // sanitize, mostly to keep spaces out 
    610         $r['exclude'] = preg_replace('[^0-9,]', '', $r['exclude']); 
     610        $r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']); 
    611611 
    612612        // Allow plugins to filter an array of excluded pages 
    613613        $r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude']))); 
  • wp-includes/class-phpmailer.php

     
    14091409   */ 
    14101410  function EncodeQ ($str, $position = 'text') { 
    14111411    /* There should not be any EOL in the string */ 
    1412     $encoded = preg_replace("[\r\n]", '', $str); 
     1412    $encoded = preg_replace("/[\r\n]/", '', $str); 
    14131413 
    14141414    switch (strtolower($position)) { 
    14151415      case 'phrase': 
  • wp-includes/formatting.php

     
    19601960 * @return string 
    19611961 */ 
    19621962function tag_escape($tag_name) { 
    1963         $safe_tag = strtolower( preg_replace('[^a-zA-Z_:]', '', $tag_name) ); 
     1963        $safe_tag = strtolower( preg_replace('/[^a-zA-Z_:]/', '', $tag_name) ); 
    19641964        return apply_filters('tag_escape', $safe_tag, $tag_name); 
    19651965} 
    19661966