[wp-trac] [WordPress Trac] #37565: Different protocols than http and https are ripped off at individual links

WordPress Trac noreply at wordpress.org
Thu Aug 4 00:23:53 UTC 2016


#37565: Different protocols than http and https are ripped off at individual links
-----------------------------+-------------------------
 Reporter:  keksmampfer      |       Owner:
     Type:  feature request  |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Menus            |     Version:
 Severity:  normal           |  Resolution:  maybelater
 Keywords:                   |     Focuses:
-----------------------------+-------------------------
Changes (by dd32):

 * status:  new => closed
 * type:  defect (bug) => feature request
 * resolution:   => maybelater
 * milestone:  Awaiting Review =>


Comment:

 WordPress has a whitelist of valid URL protocols which can be used, both
 `steam` and `ts3server` are not currently whitelisted, and personally I
 don't think should be whitelisted for the majority of users.

 You can easily add this ability for your site by adding the following code
 to a plugin or custom theme `functions.php`:
 {{{
 // Whitelist the steam:// and ts3server:// protocols for links
 add_filter( 'kses_allowed_protocols', function( $protocols ) {
     $protocols[] = 'steam';
     $protocols[] = 'ts3server';
     return $protocols;
 } );
 }}}

 I'm sure there's probably a generic plugin on the
 [https://WordPress.org/plugins/ Plugin Directory] to do that, but I
 couldn't see one with a quick look.

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


More information about the wp-trac mailing list