Skip to content

fix: Mark tel: links as safe #190

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

Merged
merged 1 commit into from
Jun 9, 2025
Merged

fix: Mark tel: links as safe #190

merged 1 commit into from
Jun 9, 2025

Conversation

MoritzWeber0
Copy link
Member

Description

By default, Hugo only allows using http:, https:, and mailto:. URLs using other schemes are replaced with #ZgotmplZ. To allow using tel:, we have to declare it as safe using | safeURL. This marks every URL as safe which should be fine, since all content inside the repo is trusted.
See https://gohugo.io/functions/safe/url/ for more info.

Closes #185

Originally merged into booking-shortcode in #189, but it's relevant for main already. Credit goes to @zusorio, I just reopened the PR.

## Description
By default, Hugo only allows using `http:`, `https:`, and `mailto:`.
URLs using other schemes are replaced with `#ZgotmplZ`. To allow using
`tel:`, we have to declare it as safe using `| safeURL`. This marks
every URL as safe which should be fine, since all content inside the
repo is trusted.
See https://gohugo.io/functions/safe/url/ for more info.

Closes #185

<!-- Add a short description here / Eine kurze Beschreibung hier
einfügen -->

## Checklist
<!-- Check fields with: [x] / Abhaken von Punkten: [x] -->

- [x] Check the License of new pictures (non-commercial use without
attribution) <!-- Die Lizenz neuer Bilder geprüft (nicht-kommerzielle
Nutzung ohne Namensnennung) -->

The content was modified in the following languages: <!-- Der Inhalt
wurde für die folgenden Sprachen angepasst -->
- [ ] English
- [ ] German

---------

Co-authored-by: Moritz Weber <kontakt@moritz-weber.net>
Copy link

netlify bot commented Jun 9, 2025

Deploy Preview for fipguide ready!

Name Link
🔨 Latest commit e01ada9
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/684738a5e124e600081e7eb9
😎 Deploy Preview https://deploy-preview-190--fipguide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@MoritzWeber0 MoritzWeber0 requested a review from therobrob June 9, 2025 19:40
@MoritzWeber0 MoritzWeber0 changed the title fix: Mark tel: links as safe (#189) fix: Mark tel: links as safe Jun 9, 2025
@lenderom lenderom merged commit 47ed3c8 into main Jun 9, 2025
7 checks passed
@lenderom lenderom deleted the fix/tel-urls branch June 9, 2025 20:35
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

Successfully merging this pull request may close these issues.

Phone links don't work
3 participants