From 471cf5804944c831cf3a2f8f4672a67b37b00825 Mon Sep 17 00:00:00 2001 From: whyisjake Date: Wed, 18 Sep 2019 23:38:55 +0000 Subject: [PATCH] Add SMS to the list of allowed protocols. This commit expands the list of allowed protocols. It adds the `sms://` which can be used to open meessaging clients for mobile users. Props rilwis, kraftbj Fixes #39415 Built from https://develop.svn.wordpress.org/trunk@46172 git-svn-id: http://core.svn.wordpress.org/trunk@45984 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 9 +++++---- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index f3f9c5ff0f..035347e1ed 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -5983,6 +5983,7 @@ function send_frame_options_header() { * @since 3.3.0 * @since 4.3.0 Added 'webcal' to the protocols array. * @since 4.7.0 Added 'urn' to the protocols array. + * @since 5.3.0 Added 'sms' to the protocols array. * * @see wp_kses() * @see esc_url() @@ -5991,15 +5992,15 @@ function send_frame_options_header() { * * @return string[] Array of allowed protocols. Defaults to an array containing 'http', 'https', * 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', - * 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal', and 'urn'. This covers - * all common link protocols, except for 'javascript' which should not be - * allowed for untrusted users. + * 'mms', 'rtsp', 'sms', 'svn', 'tel', 'fax', 'xmpp', 'webcal', and 'urn'. + * This covers all common link protocols, except for 'javascript' which should not + * be allowed for untrusted users. */ function wp_allowed_protocols() { static $protocols = array(); if ( empty( $protocols ) ) { - $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal', 'urn' ); + $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'sms', 'svn', 'tel', 'fax', 'xmpp', 'webcal', 'urn' ); } if ( ! did_action( 'wp_loaded' ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 07458825b7..6d475bbda0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-46171'; +$wp_version = '5.3-alpha-46172'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.