mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Add '+' as one of the valid characters in urls specified in the front matter
Fixes #1290
This commit is contained in:
parent
02effd9dc4
commit
c42982f76b
2 changed files with 2 additions and 1 deletions
|
@ -95,7 +95,7 @@ func UnicodeSanitize(s string) string {
|
|||
target := make([]rune, 0, len(source))
|
||||
|
||||
for _, r := range source {
|
||||
if unicode.IsLetter(r) || unicode.IsDigit(r) || unicode.IsMark(r) || r == '%' || r == '.' || r == '/' || r == '\\' || r == '_' || r == '-' || r == '#' {
|
||||
if unicode.IsLetter(r) || unicode.IsDigit(r) || unicode.IsMark(r) || r == '%' || r == '.' || r == '/' || r == '\\' || r == '_' || r == '-' || r == '#' || r == '+' {
|
||||
target = append(target, r)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ func TestMakePath(t *testing.T) {
|
|||
// Issue #1488
|
||||
{"संस्कृत", "संस्कृत", false},
|
||||
{"a%C3%B1ame", "a%C3%B1ame", false}, // Issue #1292
|
||||
{"this+is+a+test", "this+is+a+test", false}, // Issue #1290
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
|
Loading…
Reference in a new issue