WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/29/2011 10:33:51 PM (9 years ago)
Author:
duck_
Message:

Introduce wp_allowed_protocols() for use in wp_kses() and esc_url(). See #18268.

This allows plugins to filter the list of protocols used for esc_url() too, and helps us keep the list of protocols in sync.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/kses.php

    r18208 r18826  
    501501 */
    502502function 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() );
    504504    $string = wp_kses_no_null($string);
    505505    $string = wp_kses_js_entities($string);
Note: See TracChangeset for help on using the changeset viewer.