I'm not sure why, but when I do something like

<a href:"tel:555.555.5555">555.555.5555</a> 

the tel: part of href is filtered out when run through filter_xss_admin. This is being used more and more on mobile sites and I would like to be able to output this through Views.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webkenny’s picture

Title: tel: not allowed through filter_xss_admin » Add "tel:" protocol to the list of allowed in filter_xss_bad_protocols
Version: 6.19 » 6.x-dev
Assigned: Unassigned » webkenny
Category: support » feature
Status: Active » Needs review
FileSize
806 bytes

The tel protocol is growing in its use on mobile devices. The attached patch adds it to the allowed list of protocols. Thanks goes to erikwebb for helping me locate the source of the stripped attribute.

Quick edit. The RFC for the Telephone protocol is located here: http://www.ietf.org/rfc/rfc2806.txt

erikwebb’s picture

subscribe

jaarong’s picture

I've tested this and it is working as expected. Also, for those that might be confused, I typed the code wrong in the first post, should be <a href="tel:555.555.5555">555.555.5555</a>

Gábor Hojtsy’s picture

Looks like a slightly different version of the patch was committed to D7 at #945332: Allow "tel:" protocol through drupal_strip_dangerous_protocols. Is this ready to be committed then?

erikwebb’s picture

Looks innocuous to me and an identical patch was committed to D7 HEAD yesterday.

Patch applies cleanly and the simple added functionality is there without side effects.

erikwebb’s picture

Priority: Normal » Minor
Status: Needs review » Reviewed & tested by the community
webkenny’s picture

The real difference was the protocol order. To keep it consistent, I have alphabetized that (moving tel before telnet) - Also, having not used CVS to create the original patch (Bad Kenny!) I ended up inadvertently changing the file name. Proper re-roll attached. Thanks for the testing.

Leaving this RTBC since the change was alphabetical.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, d6-tel-protocol-v2.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Fixed

Superb, committed, thank you.

Status: Fixed » Closed (fixed)
Issue tags: -filter_xss_bad_protocol

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