[wp-trac] [WordPress Trac] #49937: Magnet links are being broken when saving posts using Classic Editor

WordPress Trac noreply at wordpress.org
Sat Apr 18 00:40:20 UTC 2020


#49937: Magnet links are being broken when saving posts using Classic Editor
--------------------------+------------------------------
 Reporter:  KarelDonk     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:  5.4
 Severity:  major         |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by apedog):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 This is a support question. "How to". Not a bug.
 WordPress allows filtering the allowed protocols. So you can add any
 protocol you need.
 {{{
 /**
  * Add extra protocols to list of allowed protocols.
  *
  * @param array $protocols List of protocols allowed by default by
 WordPress.
  *
  * @return array $protocols Updated list including extra protocols added.
  */
 function wporg49937_add_more_protocols( $protocols ){
         $protocols[] = 'magnet';
         return $protocols;
 }
 add_filter( 'kses_allowed_protocols' , 'wporg49937_add_more_protocols' );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49937#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list