WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/30/2016 01:14:54 PM (4 years ago)
Author:
ocean90
Message:

Add 'urn' to the list of URI protocols whitelisted by default.

Props geekysoft, jorbin.
Fixes #37300.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r38670 r38686  
    49554955 * @since 3.3.0
    49564956 * @since 4.3.0 Added 'webcal' to the protocols array.
     4957 * @since 4.7.0 Added 'urn' to the protocols array.
    49574958 *
    49584959 * @see wp_kses()
     
    49634964 * @return array Array of allowed protocols. Defaults to an array containing 'http', 'https',
    49644965 *               'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet',
    4965  *               'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', and 'webcal'.
     4966 *               'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal', and 'urn'.
    49664967 */
    49674968function wp_allowed_protocols() {
     
    49694970
    49704971    if ( empty( $protocols ) ) {
    4971         $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal' );
     4972        $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal', 'urn' );
    49724973
    49734974        /**
Note: See TracChangeset for help on using the changeset viewer.