WordPress.org

Make WordPress Core

Ticket #10914: 10914.diff

File 10914.diff, 1.3 KB (added by Denis-de-Bernardy, 5 years ago)

add svn protocol as well, and update phpdoc

  • wp-includes/kses.php

     
    387387 * call this function. 
    388388 * 
    389389 * The default allowed protocols are 'http', 'https', 'ftp', 'mailto', 'news', 
    390  * 'irc', 'gopher', 'nntp', 'feed', and finally 'telnet. This covers all common 
    391  * link protocols, except for 'javascript' which should not be allowed for 
    392  * untrusted users. 
     390 * 'irc', 'gopher', 'nntp', 'feed', 'telnet, 'mms', 'rtsp' and 'svn'. This 
     391 * covers all common link protocols, except for 'javascript' which should not 
     392 * be allowed for untrusted users. 
    393393 * 
    394394 * @since 1.0.0 
    395395 * 
     
    398398 * @param array $allowed_protocols Optional. Allowed protocol in links. 
    399399 * @return string Filtered content with only allowed HTML elements 
    400400 */ 
    401 function wp_kses($string, $allowed_html, $allowed_protocols = array ('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet')) { 
     401function wp_kses($string, $allowed_html, $allowed_protocols = array ('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn')) { 
    402402        $string = wp_kses_no_null($string); 
    403403        $string = wp_kses_js_entities($string); 
    404404        $string = wp_kses_normalize_entities($string);