WordPress.org

Make WordPress Core

Ticket #19820: 19820.2.patch

File 19820.2.patch, 1.1 KB (added by kurtpayne, 3 years ago)

Fixes a unit test case

  • wordpress/wp-includes/formatting.php

     
    869869        } 
    870870 
    871871        $title = strtolower($title); 
    872         $title = preg_replace('/&.+?;/', '', $title); // kill entities 
     872        $title = preg_replace('/&\S+?;/', '', $title); // kill entities 
    873873        $title = str_replace('.', '-', $title); 
    874874 
    875875        if ( 'save' == $context ) { 
     
    881881                $title = str_replace( array( '%c2%ab', '%c2%bb', '%e2%80%b9', '%e2%80%ba' ), '', $title ); 
    882882                // curly quotes 
    883883                $title = str_replace( array( '%e2%80%98', '%e2%80%99', '%e2%80%9c', '%e2%80%9d' ), '', $title ); 
     884                $title = str_replace( array( '%e2%80%9a', '%e2%80%9b', '%e2%80%9e', '%e2%80%9f' ), '', $title ); 
    884885                // copy, reg, deg, hellip and trade 
    885886                $title = str_replace( array( '%c2%a9', '%c2%ae', '%c2%b0', '%e2%80%a6', '%e2%84%a2' ), '', $title ); 
     887                // times 
     888                $title = str_replace( '%c3%97', 'x', $title ); 
    886889        } 
    887890 
    888891        $title = preg_replace('/[^%a-z0-9 _-]/', '', $title);