Changeset 6015
- Timestamp:
- 09/03/2007 03:59:12 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r5969 r6015 1081 1081 1082 1082 if ('' == $url) return $url; 1083 $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:% ]|i', '', $url);1083 $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@]|i', '', $url); 1084 1084 $strip = array('%0d', '%0a'); 1085 1085 $url = str_replace($strip, '', $url); 1086 1086 $url = str_replace(';//', '://', $url); 1087 // Append http unless a relative link starting with / or a php file. 1088 if ( strpos($url, '://') === false && 1087 /* If the URL doesn't appear to contain a scheme, we 1088 * presume it needs http:// appended (unless a relative 1089 * link starting with / or a php file). 1090 */ 1091 if ( strpos($url, ':') === false && 1089 1092 substr( $url, 0, 1 ) != '/' && !preg_match('/^[a-z0-9-]+?\.php/i', $url) ) 1090 1093 $url = 'http://' . $url;
Note: See TracChangeset
for help on using the changeset viewer.