WordPress.org

Make WordPress Core

Changeset 4148


Ignore:
Timestamp:
08/31/2006 05:30:17 PM (15 years ago)
Author:
ryan
Message:

Fix percent stripping in clean_url.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.