Changes from branches/2.3/wp-includes/formatting.php at r6183 to trunk/wp-includes/formatting.php at r6150
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r6183 r6150 1088 1088 } 1089 1089 1090 function clean_url( $url, $protocols = null , $context = 'display') {1090 function clean_url( $url, $protocols = null ) { 1091 1091 $original_url = $url; 1092 1092 … … 1104 1104 $url = 'http://' . $url; 1105 1105 1106 // Replace ampersands ony when displaying. 1107 if ( 'display' == $context ) 1108 $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); 1109 1106 $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); 1110 1107 if ( !is_array($protocols) ) 1111 1108 $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'); … … 1113 1110 return ''; 1114 1111 1115 return apply_filters('clean_url', $url, $original_url, $context); 1116 } 1117 1118 function sanitize_url( $url, $protocols = null ) { 1119 return clean_url( $url, $protocols, 'db'); 1112 return apply_filters('clean_url', $url, $original_url); 1120 1113 } 1121 1114
Note: See TracChangeset
for help on using the changeset viewer.