Skip to content

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 <[email protected]>
@netlify
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
@MoritzWeber0 MoritzWeber0 added the technical Technical issues, e.g. related to Hugo, HTML, CSS, deployment, etc. label Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Technical issues, e.g. related to Hugo, HTML, CSS, deployment, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phone links don't work

4 participants