Enabling skype: and sip: URLs in WordPress MU 1.5.1
June 11th, 2008 by Dan YorkLast week when I put up my request for readers to dial into some sample voice applications, I received the feedback (ironically via Twitter) that my “skype:” and “sip:” URLs weren’t working. They appeared in the text correctly:
skype:+990009369996076704
sip:9996076704@sip.voxeo.net
but they weren’t “clickable”. Instead of launching your Skype or SIP client, they went instead to:
http://blogs.voxeo.com/voiplab/2008/06/03/got-a-minute-to-make-a-couple-of-phone-calls-to-generate-some-traffic-for-screencasts/+990009369996076704
http://blogs.voxeo.com/voiplab/2008/06/03/got-a-minute-to-make-a-couple-of-phone-calls-to-generate-some-traffic-for-screencasts/9996076704@sip.voxeo.ne
Neither of which worked, of course, so people got the good old 404 screen. (Some of you may know where this is going…) A quick look at the code showed the problem:
<a href=”+990009369996076704″>skype:+990009369996076704&t;/a> or <a href=”sip:9996076704@sip.voxeo.net”>9996076704@sip.voxeo.net</a>
The “skype:” and “sip:” URL prefixes were being helpfully stripped out when the post was being published! The links were then relative URLs which were of course bogus.
The solution turned out to be similar to what I could do to solve my embedding XML problem… modify the kses.php file. There at line 338 was this:
function wp_kses($string, $allowed_html, $allowed_protocols = array (’http’, ‘https’, ‘ftp’, ‘ftps’, ‘mailto’, ‘news’, ‘irc’, ‘gopher’, ‘nntp’, ‘feed’, ‘telnet’)) {
And so a simple change of adding ’skype’ and ’sip’ to the end of the list like this:
function wp_kses($string, $allowed_html, $allowed_protocols = array (’http’, ‘https’, ‘ftp’, ‘ftps’, ‘mailto’, ‘news’, ‘irc’, ‘gopher’, ‘nntp’, ‘feed’, ‘telnet’, ’skype’, ’sip’)) {
seems to have fixed the problem. I had to re-enter the URL prefixes on the original post, but now the “skype:” and “sip:” URLs do work in the edited post.
Fun, fun, fun…
Technorati Tags: wordpress, wordpress mu, wpmu, skype, sip
Tags: SIP, Skype, WordPress, wordpressmu, WPMU
RSS Feed
August 1st, 2008 at 2:18 pm
[...] Behind The Blog A blog about a blog (site)… a view inside a WordPress MU installation « Enabling skype: and sip: URLs in WordPress MU 1.5.1 [...]