Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/url.go')
-rw-r--r--helpers/url.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/helpers/url.go b/helpers/url.go
index 3c178f0ff..922d4aa80 100644
--- a/helpers/url.go
+++ b/helpers/url.go
@@ -288,10 +288,13 @@ func AddContextRoot(baseURL, relativePath string) string {
return newPath
}
+// 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))
}
+// URLPrep applies misc sanitation to the given URL.
func URLPrep(ugly bool, in string) string {
if ugly {
x := Uglify(SanitizeURL(in))