Skip to content

Commit

Permalink
Add '+' as one of the valid characters in urls specified in the front…
Browse files Browse the repository at this point in the history
… matter

Fixes gohugoio#1290
  • Loading branch information
egonSchiele committed Mar 18, 2016
1 parent 989c748 commit 904c83f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion helpers/path.go
Expand Up @@ -96,7 +96,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)
}
}
Expand Down
1 change: 1 addition & 0 deletions helpers/path_test.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 904c83f

Please sign in to comment.