hugolib: Support reflinks starting with a slash

Fixes #3703
This commit is contained in:
Bjørn Erik Pedersen
2017-07-15 11:05:14 +02:00
parent 0c90e6d710
commit dbe63970e0
2 changed files with 12 additions and 3 deletions

View File

@@ -416,6 +416,9 @@ func (s *SiteInfo) refLink(ref string, page *Page, relative bool, outputFormat s
var refURL *url.URL
var err error
ref = filepath.ToSlash(ref)
ref = strings.TrimPrefix(ref, "/")
refURL, err = url.Parse(ref)
if err != nil {