Changeset 4148

Show
Ignore:
Timestamp:
08/31/06 17:30:17 (2 years ago)
Author:
ryan
Message:

Fix percent stripping in clean_url.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/formatting.php

    r4144 r4148  
    10381038function clean_url( $url ) { 
    10391039    if ('' == $url) return $url; 
    1040     $url = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $url); 
     1040    $url = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $url); 
     1041    $strip = array('%0d', '%0a'); 
     1042    $url = str_replace($strip, '', $url); 
    10411043    $url = str_replace(';//', '://', $url); 
    10421044    $url = (!strstr($url, '://')) ? 'http://'.$url : $url;