Skip to content

Conversation

@zusorio
Copy link
Contributor

@zusorio zusorio commented Jun 9, 2025

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

Checklist

  • Check the License of new pictures (non-commercial use without attribution)

The content was modified in the following languages:

  • English
  • German

@netlify
Copy link

netlify bot commented Jun 9, 2025

Deploy Preview for fipguide ready!

Name Link
🔨 Latest commit 27248bc
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/68471436d84cda000855bca1
😎 Deploy Preview https://deploy-preview-189--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 and others added 2 commits June 9, 2025 19:03
…#188)

Instead of having the copy icon directly after the text (which produced
some issues with multi-line texts), always place the the copy icon on
the right side. It's easier to reach for right-handed people.

Not 100% sure if the link icon is still recognized with a connection to
the title, so happy to hear any feedback.

Resolves fipguide#49

Was originally approved in
fipguide#177, but didn't
target the correct branch. Here is another attempt to get it to the main
branch.
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 fipguide#185
@lenderom lenderom changed the base branch from main to feat/booking-shortcode June 9, 2025 17:30
Copy link
Member

@lenderom lenderom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Tobi,
Good catch, thanks for your contribution.
I think the first use case will be in #180, so let's merge it there :)

@MoritzWeber0
Copy link
Member

Hi Tobi, Good catch, thanks for your contribution. I think the first use case will be in #180, so let's merge it there :)

The tel: links are already used on the Eurostar website, so there is an immediate improvement :)
Thanks @zusorio!

@MoritzWeber0 MoritzWeber0 merged commit 42545ef into fipguide:feat/booking-shortcode Jun 9, 2025
6 checks passed
@zusorio zusorio deleted the fix-tel-urls branch June 9, 2025 17:38
MoritzWeber0 added a commit that referenced this pull request Jun 9, 2025
## 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]>
lenderom pushed a commit that referenced this pull request Jun 9, 2025
## 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.

Co-authored-by: Tobias Messner <[email protected]>
@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

3 participants