App Deep Links and #ZgotmplZ
cheddarwhizzy opened this issue · comments
Brett Porter commented
Hi, I'm sure this is a quick solution but I thought I'd post until I figured it out.
When I pass in an app deep link such as mycoolapp-app://someInAppRoute?data=123456
as my .Hermes.Product.Link, it gets converted to #ZgotmplZ
.
How can I make the scheme mycoolapp-app://
allowed in Hermes?
Brett Porter commented
changing the template function here
Line 29 in 23ab47d
to
var templateFuncs = template.FuncMap{
"url": func(s string) template.URL {
return template.URL(s)
},
"safeURL": func(s string) template.URL {
return template.URL(s)
},
}
and in my template {{ .Hermes.Product.Link | safeURL }}
did the trick.
here's a PR
#35
Brett Porter commented
Didn't realize this was the same function.. Closing..
{{ .Hermes.Product.Link | url }}