Download & Extend

Add more chat protocol support to filter_allowed_protocols

Project:Drupal core
Version:6.20
Component:filter.module
Category:bug report
Priority:normal
Assigned:Dave Reid
Status:needs review

Issue Summary

I think that Drupal's default "Filtered HTML" input format should leave <a href="skype:USERNAME?call"> HTML code as is.

Comments

#1

Version:5.x-dev» 6.6

Adding a skype link to the site footer via the Site Information page like this:

<a href="skype:username?call">Call username with skype</a>

Will render the following code:

<a href="username?call">Call username with skype</a>

There is no option to select Full HTML as the filter for the footer region, is it possible to make skype links work with Filtered HTML?

#2

Status:active» fixed

The bad guy is filter_xss_bad_protocol(), which allows for all kinds of protocols, but not skype. Because it uses a (hidden) variable, you can change it by hand using one of the following methods: This works or D5 as well.

1. If you have devel module, execute this code in the "Execute PHP" block:

<?php
variable_set
('filter_allowed_protocols', array('http', 'https', 'ftp', 'news', 'nntp', 'telnet', 'mailto', 'irc', 'ssh', 'sftp', 'webcal', 'rtsp', 'skype'));
?>

2. Or you can hardcode the value in your settings.php file. Scroll down to the bottom of the settings.php file and you'll find a commented out section of code like this:

<?php
# $conf = array(
#   'site_name' => 'My Drupal site',
#   'theme_default' => 'minnelli',
#   'anonymous' => 'Visitor',
# );
?>

Change this to:

<?php
  $conf
= array(
   
'filter_allowed_protocols' => array('http', 'https', 'ftp', 'news', 'nntp', 'telnet', 'mailto', 'irc', 'ssh', 'sftp', 'webcal', 'rtsp', 'skype');
  );
?>

#3

Thanks Maarten, worked a treat!

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#5

There's a typo in the code you should to paste into settings.php, as said here: http://drupal.org/node/185350#comment-616830

Besides, in my site the code won't work with the

<?php

?>
around it, so I use the following now (and it works):

$conf = array(
'filter_allowed_protocols' => array('http', 'https', 'ftp', 'news', 'nntp', 'telnet', 'mailto', 'irc', 'ssh', 'sftp', 'webcal', 'mms', 'rstp', 'skype'),
);

#6

Title:Skype links support» Add more chat protocol support to filter_allowed_protocols
Version:6.6» 7.x-dev
Category:feature request» bug report
Assigned to:Anonymous» Dave Reid
Status:closed (fixed)» active

There are a few chat protocol formats we should add since we include irc://

skype://
gtalk://
xmpp:// (jabber)

#7

Status:active» fixed

I doubt this would gain any support for proprietary chats like gtalk and skype, so I'm going to mark this back as fixed. Note I've also created a small D6 and D7 module http://drupal.org/project/filter_protocols to expose this variables settings.

#8

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#9

Version:7.x-dev» 6.20
Status:closed (fixed)» needs review

How could be explained the following transformation of a correct link?

<a href="skype:username?call">Call username with skype</a>

Expected result:
<a href="username?call">Call username with skype</a>

Rendered code:
<a href="username?call=">Call username with skype</a>

Any piece of advice is more than welcome.

nobody click here