Ticket #4051: 4051.2.diff
| File 4051.2.diff, 1.3 KB (added by , 17 years ago) |
|---|
-
wp-admin/edit-link-form.php
383 383 <h3><label for="link_url"><?php _e('Web Address') ?></label></h3> 384 384 <div class="inside"> 385 385 <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> — don’t forget the <code>http://</code>'); ?></p>386 <p><?php _e('Example: <code>#anchor</code> or <code>http://wordpress.org/</code> — don’t forget the <code>http://</code>'); ?></p> 387 387 </div> 388 388 </div> 389 389 -
wp-includes/formatting.php
2004 2004 * link starting with / or a php file). 2005 2005 */ 2006 2006 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) ) 2008 2008 $url = 'http://' . $url; 2009 2009 2010 2010 // Replace ampersands and single quotes only when displaying.