Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow "tel:" links #104

Closed
DannyBen opened this issue Mar 1, 2016 · 7 comments
Closed

Allow "tel:" links #104

DannyBen opened this issue Mar 1, 2016 · 7 comments
Labels
allowlist issues related to what tags or attributes are allowed
Milestone

Comments

@DannyBen
Copy link

DannyBen commented Mar 1, 2016

Hello,

Can we allow tel: links?
I believe it is somewhere in this neighborhood

(The below was copied verbatim from this rails-html-sanitizer issue)

Is it intentional that tel: links are not allowed? Seems like a harmless protocol that should be allowed

>> sanitize("<a href='http://123'>click</a>")
=> "<a href=\"http://123\">click</a>"
>> sanitize("<a href='tel:123'>click</a>")
=> "<a>click</a>"

As a workaround, I am currently using:

# config/initializers/sanitize.rb
Loofah::HTML5::WhiteList::ALLOWED_PROTOCOLS.add('tel')

As proposed by this StackOverflow answer

@abhayks1
Copy link

I also need this asap.
hope it can be added soon.

@abhayks1
Copy link

The workaround is not working for me on 'rails', '5.0' and ruby-2.3.0
Am I missing anthing?

@ryym
Copy link

ryym commented Mar 9, 2018

This workaround works for me. Thanks!

  • Ruby 2.4.2
  • Rails 5.1.5

@vadimeremeev
Copy link

Created pull request #147

@caspark
Copy link

caspark commented Aug 6, 2018

Per https://stackoverflow.com/q/1164004 , callto (which is supported) is a non-standard Skype thing.

So yes, it'd be great to have #147 merged.

@flavorjones flavorjones added the allowlist issues related to what tags or attributes are allowed label Oct 27, 2018
@flavorjones flavorjones added this to the v2.3.0 milestone Oct 28, 2018
@Ruekompa
Copy link

Ruekompa commented Mar 28, 2019

Works for me. Thank you!

  • Ruby 2.5.3
  • Rails 5.2.1

@flavorjones
Copy link
Owner

v2.3.0 has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
allowlist issues related to what tags or attributes are allowed
Projects
None yet
Development

No branches or pull requests

7 participants