[wp-trac] [WordPress Trac] #30464: kses_allowed_protocols filter not working

WordPress Trac noreply at wordpress.org
Sun Nov 23 14:02:40 UTC 2014


#30464: kses_allowed_protocols filter not working
--------------------------+-----------------------------
 Reporter:  hatul         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.0.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I try add filter to allowed protocols but its not working.

 My code:
 {{{
 function wpse_allow_sms_protocol( $protocols ) {
     $protocols = array('sms');
     return $protocols;
 }

 add_filter( 'kses_allowed_protocols', 'wpse_allow_sms_protocol' );
 print_r(wp_allowed_protocols());
 }}}
 print:
 {{{
  Array ( [0] => http [1] => https [2] => ftp [3] => ftps [4] => mailto [5]
 => news [6] => irc [7] => gopher [8] => nntp [9] => feed [10] => telnet
 [11] => mms [12] => rtsp [13] => svn [14] => tel [15] => fax [16] => xmpp
 )
 }}}
 I found this problem [https://wordpress.org/support/topic/filter-
 kses_allowed_protocols-not-working?replies=1 in forum too ] without
 answer.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30464>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list