WordPress.org

Make WordPress Core

Changeset 5067


Ignore:
Timestamp:
03/21/07 00:38:05 (8 years ago)
Author:
ryan
Message:

Don't add http:// to relative links. Props donncha. fixes #4001 for 2.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-includes/functions-formatting.php

    r4672 r5067  
    10521052    $url = str_replace($strip, '', $url); 
    10531053    $url = str_replace(';//', '://', $url); 
    1054     $url = (!strstr($url, '://')) ? 'http://'.$url : $url; 
     1054    $url = (strpos($url, '://') === false && substr( $url, 0, 1 ) != '/' ) ? 'http://'.$url : $url; 
    10551055    $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); 
    10561056    if ( !is_array($protocols) ) 
Note: See TracChangeset for help on using the changeset viewer.