Ticket #37300: protocol_2.patch
File protocol_2.patch, 1.2 KB (added by , 8 years ago) |
---|
-
functions.php
4957 4957 * 4958 4958 * @since 3.3.0 4959 4959 * @since 4.3.0 Added 'webcal' to the protocols array. 4960 * @since 4.6.2 Added 'urn' to the protocols array. 4960 4961 * 4961 4962 * @see wp_kses() 4962 4963 * @see esc_url() … … 4965 4966 * 4966 4967 * @return array Array of allowed protocols. Defaults to an array containing 'http', 'https', 4967 4968 * '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'. 4969 4970 */ 4970 4971 function wp_allowed_protocols() { 4971 4972 static $protocols = array(); 4972 4973 4973 4974 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' ); 4975 4976 4976 4977 /** 4977 4978 * Filters the list of protocols allowed in HTML attributes.