There is a requirement in my website: The post content should have a link (it is for IOS device to install apps) like the following.

<a href="itms-services://?action=download-manifest&url=http://www.mywebsitname.com/appdown/CESBGM.plist" class="STYLE17">Install APP</a>

I used the Ckeditor and it can make it.

Is there any other ways to make it? I tried the Link module, but it failed.

1 Answer 1


Drupal has a function called filter_xss_bad_protocol that strips unknown protocols from links created with the l() function - This is a very smart idea but makes it difficult when you want to include emerging link protocols like skype:// for example. Dave Reid has created a fantastic module that works around this and allows developers to add their own protocols to the list.


With that module installed, and your specific protocol added to its configuration screen, it would then be possible to do something like this in your code:

<?php print l("Displayed Text", "itms-services://?action=download-manifest"?>

Additionally, use the attributes and query parameters of the l() function to pass your url parameter to the link. See this for an example... http://api.drupal.org/api/drupal/includes%21common.inc/function/l/7 - You'll find the particular comment regarding passing parameters on that page here: http://api.drupal.org/comment/38198#comment-38198

Hope that helps! Good luck.

P.S. To clarify, simply adding the above module and configuring it will also allow the Link module to respect the protocol since it passes everything through l() - So no code required. :) Merely for completeness.

  • ,Thank you for your replay. I have been google it for a long time. I try to use the filter_protocols module,and try to add the itms-services protocol but get the message:Invalid protocol itms-services. The protocol cannot be added. what should i do know now ?
    – googlg
    Feb 28, 2013 at 1:39
  • I have no idea what to do?
    – googlg
    Feb 28, 2013 at 5:51
  • God bless me,to solve it
    – googlg
    Feb 28, 2013 at 9:41
  • Can you please be more specific in how you are adding it? What exactly are you typing into the field?
    – webkenny
    Mar 1, 2013 at 17:56
  • my question is to add the itms-services protocol. But ues the filter_protocol cannot add it.the solve the problem follow the instructions in the article: drupal.org/node/185350 I rewrite the settings.php file.
    – googlg
    Mar 4, 2013 at 0:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.