mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
@@ -77,7 +77,7 @@ func sanitizeURLWithFlags(in string, f purell.NormalizationFlags) string {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if !strings.HasPrefix(u.Path, "/") {
|
||||
if len(u.Path) > 0 && !strings.HasPrefix(u.Path, "/") {
|
||||
u.Path = "/" + u.Path
|
||||
}
|
||||
return u.String()
|
||||
|
||||
Reference in New Issue
Block a user