Ticket #39415: 39415.patch
| File 39415.patch, 1.7 KB (added by , 7 years ago) |
|---|
-
wp-includes/functions.php
1 <?php1 <?php 2 2 /** 3 3 * Main WordPress API 4 4 * … … 5695 5695 * @since 3.3.0 5696 5696 * @since 4.3.0 Added 'webcal' to the protocols array. 5697 5697 * @since 4.7.0 Added 'urn' to the protocols array. 5698 * @since 5.x.x Added 'skype' and 'sms' to the protocols array. 5698 5699 * 5699 5700 * @see wp_kses() 5700 5701 * @see esc_url() … … 5703 5704 * 5704 5705 * @return string[] Array of allowed protocols. Defaults to an array containing 'http', 'https', 5705 5706 * 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 5706 * 'mms', 'rtsp', 's vn', 'tel', 'fax', 'xmpp', 'webcal', and 'urn'. This covers5707 * all common link protocols, except for 'javascript' which should not be5708 * allowed for untrusted users.5707 * 'mms', 'rtsp', 'skype', 'sms', 'svn', 'tel', 'fax', 'xmpp', 'webcal', and 'urn'. 5708 * This covers all common link protocols, except for 'javascript' which should not 5709 * be allowed for untrusted users. 5709 5710 */ 5710 5711 function wp_allowed_protocols() { 5711 5712 static $protocols = array(); 5712 5713 5713 5714 if ( empty( $protocols ) ) { 5714 $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 's vn', 'tel', 'fax', 'xmpp', 'webcal', 'urn' );5715 $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'skype', 'sms', 'svn', 'tel', 'fax', 'xmpp', 'webcal', 'urn' ); 5715 5716 } 5716 5717 5717 5718 if ( ! did_action( 'wp_loaded' ) ) {