mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
server: Fix redirects when file path contains bytes > 0x80
Fixes #10287
This commit is contained in:
@@ -47,7 +47,7 @@ func TestExecute(t *testing.T) {
|
||||
c.Assert(resp.Err, qt.IsNil)
|
||||
result := resp.Result
|
||||
c.Assert(len(result.Sites) == 1, qt.Equals, true)
|
||||
c.Assert(len(result.Sites[0].RegularPages()) == 1, qt.Equals, true)
|
||||
c.Assert(len(result.Sites[0].RegularPages()) == 2, qt.Equals, true)
|
||||
c.Assert(result.Sites[0].Info.Params()["myparam"], qt.Equals, "paramproduction")
|
||||
})
|
||||
|
||||
@@ -362,11 +362,20 @@ weight: 1
|
||||
|
||||
Content
|
||||
|
||||
`)
|
||||
|
||||
writeFile(t, filepath.Join(dir, contentDir, "hügö.md"), `
|
||||
---
|
||||
weight: 2
|
||||
---
|
||||
|
||||
This is hügö.
|
||||
|
||||
`)
|
||||
|
||||
writeFile(t, filepath.Join(dir, "layouts", "_default", "single.html"), `
|
||||
|
||||
Single: {{ .Title }}
|
||||
Single: {{ .Title }}|{{ .Content }}
|
||||
|
||||
`)
|
||||
|
||||
|
Reference in New Issue
Block a user