WordPress.org

Make WordPress Core

Ticket #4051: 4051.2.diff

File 4051.2.diff, 1.3 KB (added by scohoust, 9 years ago)
  • wp-admin/edit-link-form.php

     
    383383<h3><label for="link_url"><?php _e('Web Address') ?></label></h3>
    384384<div class="inside">
    385385        <input type="text" name="link_url" size="30" class="code" tabindex="1" value="<?php echo attr($link->link_url); ?>" id="link_url" />
    386     <p><?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?></p>
     386        <p><?php _e('Example: <code>&#35;anchor</code> or <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?></p>
    387387</div>
    388388</div>
    389389
  • 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.