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

Support for other protocols in links #17

Closed
metbril opened this issue Nov 30, 2019 · 5 comments
Closed

Support for other protocols in links #17

metbril opened this issue Nov 30, 2019 · 5 comments

Comments

@metbril
Copy link
Contributor

metbril commented Nov 30, 2019

I want to use tel:, skype: or whatsapp:// links in the homepage. Those are stripped by Hugo. To prevent this, the .url variable needs to be post-processed by the safeURL function.

This is the current code:

<a rel="me" href="{{ .url }}" title="{{ .title }}">

href="{{ .url }}"

should become

href="{{ .url | safeURL }}"
@EmielH
Copy link
Owner

EmielH commented Dec 5, 2019

Thanks for bringing this to my attention! I will look into this as soon as I have a bit of spare time.

EmielH added a commit that referenced this issue Dec 22, 2019
@EmielH
Copy link
Owner

EmielH commented Dec 22, 2019

@metbril I committed a fix for this. Could you check if this solves your problem? Thanks a lot!

@metbril
Copy link
Contributor Author

metbril commented Dec 22, 2019

I don't have access to a computer this week. Phone only. I'll chime back in asap.

@patrickderitter
Copy link

Hi @EmielH and @metbril, as I needed this support for a project as well, I tested this and can confirm this works.

@EmielH
Copy link
Owner

EmielH commented Jun 15, 2020

Thanks a lot! 👍 I'll close this now.

@EmielH EmielH closed this as completed Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants