Changeset 18469
- Timestamp:
- 07/26/2011 07:44:18 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r18465 r18469 2257 2257 /* If the URL doesn't appear to contain a scheme, we 2258 2258 * presume it needs http:// appended (unless a relative 2259 * link starting with / or a php file).2259 * link starting with /, # or ? or a php file). 2260 2260 */ 2261 if ( strpos($url, ':') === false && 2262 substr( $url, 0, 1 ) != '/' && substr( $url, 0, 1 ) != '#' && !preg_match('/^[a-z0-9-]+?\.php/i', $url) )2261 if ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) && 2262 ! preg_match('/^[a-z0-9-]+?\.php/i', $url) ) 2263 2263 $url = 'http://' . $url; 2264 2264
Note: See TracChangeset
for help on using the changeset viewer.