summaryrefslogtreecommitdiffstats
path: root/helpers/url.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-11-26 15:50:32 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-11-27 14:36:17 +0100
commitc38bfda43bde093aa5f3b3245e3d2de5190d1991 (patch)
tree71d3d6dd02ac7b6eaf2861ff8691c6d98a960e9a /helpers/url.go
parent1f6e0de36152f919609518f954fa0c55caad03f4 (diff)
hugolib: Fix regressions with uglyURLs
Fixes #2734
Diffstat (limited to 'helpers/url.go')
-rw-r--r--helpers/url.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/helpers/url.go b/helpers/url.go
index c7697b092..68079ce20 100644
--- a/helpers/url.go
+++ b/helpers/url.go
@@ -292,12 +292,12 @@ func AddContextRoot(baseURL, relativePath string) string {
// URLizeAndPrep applies misc sanitation to the given URL to get it in line
// with the Hugo standard.
func (p *PathSpec) URLizeAndPrep(in string) string {
- return URLPrep(p.uglyURLs, p.URLize(in))
+ return p.URLPrep(p.URLize(in))
}
// URLPrep applies misc sanitation to the given URL.
-func URLPrep(ugly bool, in string) string {
- if ugly {
+func (p *PathSpec) URLPrep(in string) string {
+ if p.uglyURLs {
x := Uglify(SanitizeURL(in))
return x
}