Ticket #18268: 18268.diff
| File 18268.diff, 1.9 KB (added by , 15 years ago) |
|---|
-
wp-includes/functions.php
4609 4609 @header( 'X-Frame-Options: SAMEORIGIN' ); 4610 4610 } 4611 4611 4612 function wp_allowed_protocols() { 4613 static $protocols; 4614 4615 if ( empty( $protocols ) ) { 4616 $protocols = array ( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn' ); 4617 $protocols = apply_filters( 'kses_allowed_protocols', $protocols ); 4618 } 4619 4620 return $protocols; 4621 } 4622 4612 4623 ?> -
wp-includes/formatting.php
2299 2299 $url = str_replace( "'", ''', $url ); 2300 2300 } 2301 2301 2302 if ( ! is_array($protocols) )2303 $protocols = array ('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn');2302 if ( ! is_array( $protocols ) ) 2303 $protocols = wp_allowed_protocols(); 2304 2304 if ( wp_kses_bad_protocol( $url, $protocols ) != $url ) 2305 2305 return ''; 2306 2306 -
wp-includes/kses.php
500 500 * @return string Filtered content with only allowed HTML elements 501 501 */ 502 502 function wp_kses($string, $allowed_html, $allowed_protocols = array ()) { 503 $allowed_protocols = wp_parse_args( $allowed_protocols, apply_filters('kses_allowed_protocols', array ('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn') ));503 $allowed_protocols = wp_parse_args( $allowed_protocols, wp_allowed_protocols() ); 504 504 $string = wp_kses_no_null($string); 505 505 $string = wp_kses_js_entities($string); 506 506 $string = wp_kses_normalize_entities($string);