On my website ’s “About” page, I have tried adding a URL with the tox:
protocol (Tox is decentralised a chat platform ). It is present in a TOML in the site source , but, once built, I get a garbage URL https://robot-one.github.io/#ZgotmplZ
.
er… I’ve got no idea what is causing this. I’m guessing Hugo, as it is processing the TOML. This is the theme I’m using . Does it not like defining different protocols, like magnet:
, tel:
etc.?
Override the theme’s social partial:
mkdir layouts/partials
cp themes/dream/layouts/partials/socials.html layouts/partials/socials.html
Then change line 66 from:
<a class="item" href="{{ .href }}" target="{{ .target }}">
to:
<a class="item" href="{{ .href | safeURL }}" target="{{ .target }}">
1 Like
jmooring:
| safeURL
That fixed it! Thank you!
Was it some sort of fallback thing for unknown protocols, e.g. kinda like Ungoogled Chromium’s use of 9oo91e.qjz9zk
for Google domains?
This is due to Go’s template security model .
Without digging into the details, it appears from this document that the http
, https
, and mailto
protocols are on the allow list.
1 Like
system
Closed
September 17, 2022, 9:58pm
5
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.