WordPress.org

Make WordPress Core

Ticket #10077: add-spaces.patch

File add-spaces.patch, 562 bytes (added by noel, 5 years ago)

Fix for spaces in clean_url

  • wp-includes/formatting.php

     
    20412041        $original_url = $url; 
    20422042 
    20432043        if ('' == $url) return $url; 
    2044         $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $url); 
     2044        $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff\\x20]|i', '', $url); 
    20452045        $strip = array('%0d', '%0a'); 
    20462046        $url = str_replace($strip, '', $url); 
    20472047        $url = str_replace(';//', '://', $url);