WordPress.org

Make WordPress Core

Ticket #4051: 4051.patch

File 4051.patch, 590 bytes (added by hakre, 5 years ago)

clean_url() acccepts # against 2.8 trunk

  • wp-includes/formatting.php

     
    20042004         * link starting with / or a php file). 
    20052005         */ 
    20062006        if ( strpos($url, ':') === false && 
    2007                 substr( $url, 0, 1 ) != '/' && !preg_match('/^[a-z0-9-]+?\.php/i', $url) ) 
     2007                substr( $url, 0, 1 ) != '/' && substr( $url, 0, 1 ) != '#' && !preg_match('/^[a-z0-9-]+?\.php/i', $url) ) 
    20082008                $url = 'http://' . $url; 
    20092009 
    20102010        // Replace ampersands and single quotes only when displaying.