From: Bjørn Erik Pedersen Date: Tue, 2 May 2017 21:46:36 +0000 (+0200) Subject: tpl/urls: Make urlize return a string X-Git-Tag: v0.21~52 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3dd949d9;p=brevno-suite%2Fhugo tpl/urls: Make urlize return a string Like it did in 0.20. --- diff --git a/tpl/urls/urls.go b/tpl/urls/urls.go index 5d107778..ee4457e7 100644 --- a/tpl/urls/urls.go +++ b/tpl/urls/urls.go @@ -54,12 +54,12 @@ func (ns *Namespace) RelURL(a interface{}) (template.HTML, error) { return template.HTML(ns.deps.PathSpec.RelURL(s, false)), nil } -func (ns *Namespace) URLize(a interface{}) (template.URL, error) { +func (ns *Namespace) URLize(a interface{}) (string, error) { s, err := cast.ToStringE(a) if err != nil { return "", nil } - return template.URL(ns.deps.PathSpec.URLize(s)), nil + return ns.deps.PathSpec.URLize(s), nil } type reflinker interface {