WordPress.org

Make WordPress Core

Ticket #6697: bug6697.2.patch

File bug6697.2.patch, 484 bytes (added by pauamma, 6 years ago)

Revised patch, should address review comments

  • wp-includes/formatting.php

    old new  
    702702        $title = preg_replace('/\s+/', '-', $title); 
    703703        $title = preg_replace('|-+|', '-', $title); 
    704704        $title = trim($title, '-'); 
     705        // Use uppercase hex digits in URI-escaped characters 
     706        $title = preg_replace_callback( '/%[a-f0-9][a-f0-9]/', 
     707                                                                        create_function( '$m', 'return strtoupper( $m[0] );' ), 
     708                                                                        $title ); 
    705709 
    706710        return $title; 
    707711}