tpl/urls: Make urlize return a string

Like it did in 0.20.
This commit is contained in:
Bjørn Erik Pedersen 2017-05-02 23:46:36 +02:00
parent a40d1f6ed2
commit 3dd949d956

View file

@ -54,12 +54,12 @@ func (ns *Namespace) RelURL(a interface{}) (template.HTML, error) {
return template.HTML(ns.deps.PathSpec.RelURL(s, false)), nil 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) s, err := cast.ToStringE(a)
if err != nil { if err != nil {
return "", nil return "", nil
} }
return template.URL(ns.deps.PathSpec.URLize(s)), nil return ns.deps.PathSpec.URLize(s), nil
} }
type reflinker interface { type reflinker interface {