WordPress.org

Make WordPress Core

Ticket #10823: sanitize_title_with_dashes.patch

File sanitize_title_with_dashes.patch, 540 bytes (added by williamsba1, 4 years ago)
  • wp-includes/formatting.php

     
    828828        } 
    829829 
    830830        $title = strtolower($title); 
    831         $title = preg_replace('/&.+?;/', '', $title); // kill entities 
     831        $title = preg_replace('/&[a-z0-9]+?;/', '', $title); // kill entities 
    832832        $title = str_replace('.', '-', $title); 
    833833        $title = preg_replace('/[^%a-z0-9 _-]/', '', $title); 
    834834        $title = preg_replace('/\s+/', '-', $title);