WordPress.org

Make WordPress Core

Changeset 5065


Ignore:
Timestamp:
03/21/07 00:29:40 (7 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

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

    r5021 r5065  
    10731073    $url = str_replace($strip, '', $url); 
    10741074    $url = str_replace(';//', '://', $url); 
    1075     $url = (strpos($url, '://') === false) ? 'http://'.$url : $url; 
     1075    $url = (strpos($url, '://') === false && substr( $url, 0, 1 ) != '/' ) ? 'http://'.$url : $url; 
    10761076    $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); 
    10771077    if ( !is_array($protocols) ) 
Note: See TracChangeset for help on using the changeset viewer.