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/formatting.php

    r18824 r18826  
    23002300    }
    23012301
    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();
    23042304    if ( wp_kses_bad_protocol( $url, $protocols ) != $url )
    23052305        return '';
Note: See TracChangeset for help on using the changeset viewer.