hugolib: Avoid double-encoding of paginator URLs

Fixes #2177
This commit is contained in:
Bjørn Erik Pedersen
2017-01-08 16:54:05 +01:00
parent bc06135c96
commit 4ea4359ac1
3 changed files with 56 additions and 22 deletions

View File

@@ -171,7 +171,7 @@ func assertFileContent(t *testing.T, filename string, defaultInSubDir bool, matc
content := readDestination(t, filename)
for _, match := range matches {
match = replaceDefaultContentLanguageValue(match, defaultInSubDir)
require.True(t, strings.Contains(content, match), fmt.Sprintf("File no match for\n%q in\n%q:\n%s", match, filename, content))
require.True(t, strings.Contains(content, match), fmt.Sprintf("File no match for\n%q in\n%q:\n%s", strings.Replace(match, "%", "%%", -1), filename, strings.Replace(content, "%", "%%", -1)))
}
}