Make WordPress Core

Changeset 49055


Ignore:
Timestamp:
09/26/2020 09:00:19 PM (4 years ago)
Author:
TimothyBlynJacobs
Message:

Add ircs and irc6 to the list of allowed protocols.

This adds support for the secure and ipv6 variants of the already allowed irc protocol.

Props arealnobrainer, markparnell, ctmartin.

Location:
trunk
Files:
3 edited

Legend:

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

    r49049 r49055  
    62966296 * @since 4.7.0 Added 'urn' to the protocols array.
    62976297 * @since 5.3.0 Added 'sms' to the protocols array.
     6298 * @since 5.6.0 Added 'irc6' and 'ircs' to the protocols array.
    62986299 *
    62996300 * @see wp_kses()
     
    63016302 *
    63026303 * @return string[] Array of allowed protocols. Defaults to an array containing 'http', 'https',
    6303  *                  'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet',
    6304  *                  'mms', 'rtsp', 'sms', 'svn', 'tel', 'fax', 'xmpp', 'webcal', and 'urn'.
     6304 *                  'ftp', 'ftps', 'mailto', 'news', 'irc', 'irc6', 'ircs', 'gopher', 'nntp', 'feed',
     6305 *                  'telnet', 'mms', 'rtsp', 'sms', 'svn', 'tel', 'fax', 'xmpp', 'webcal', and 'urn'.
    63056306 *                  This covers all common link protocols, except for 'javascript' which should not
    63066307 *                  be allowed for untrusted users.
     
    63106311
    63116312    if ( empty( $protocols ) ) {
    6312         $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'sms', 'svn', 'tel', 'fax', 'xmpp', 'webcal', 'urn' );
     6313        $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'irc6', 'ircs', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'sms', 'svn', 'tel', 'fax', 'xmpp', 'webcal', 'urn' );
    63136314    }
    63146315
  • trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php

    r48939 r49055  
    517517            'news://news.server.example/example.group.this',
    518518            'irc://irc.freenode.net/wordpress',
     519            'irc6://irc.freenode.net/wordpress',
     520            'ircs://irc.freenode.net/wordpress',
    519521            'gopher://example.com',
    520522            'nntp://news.server.example/example.group.this',
  • trunk/tests/phpunit/tests/functions/allowedProtocols.php

    r49006 r49055  
    4747            array( 'news', 'news://news.server.example/example.group.this' ),      // RFC5538
    4848            array( 'irc', 'irc://example.com/wordpress' ),
     49            array( 'irc6', 'irc6://example.com/wordpress' ),
     50            array( 'ircs', 'ircs://example.com/wordpress' ),
    4951            array( 'gopher', 'gopher://example.com/7a_gopher_selector%09foobar' ), // RFC4266
    5052            array( 'nntp', 'nntp://news.server.example/example.group.this' ),      // RFC5538
Note: See TracChangeset for help on using the changeset viewer.