Make WordPress Core

Ticket #37300: protocol_2.patch

File protocol_2.patch, 1.2 KB (added by geekysoft, 8 years ago)
  • functions.php

     
    49574957 *
    49584958 * @since 3.3.0
    49594959 * @since 4.3.0 Added 'webcal' to the protocols array.
     4960 * @since 4.6.2 Added 'urn' to the protocols array.
    49604961 *
    49614962 * @see wp_kses()
    49624963 * @see esc_url()
     
    49654966 *
    49664967 * @return array Array of allowed protocols. Defaults to an array containing 'http', 'https',
    49674968 *               'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet',
    4968  *               'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', and 'webcal'.
     4969 *               'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal', and 'urn'.
    49694970 */
    49704971function wp_allowed_protocols() {
    49714972        static $protocols = array();
    49724973
    49734974        if ( empty( $protocols ) ) {
    4974                 $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal' );
     4975                $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal', 'urn' );
    49754976
    49764977                /**
    49774978                 * Filters the list of protocols allowed in HTML attributes.