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 #1290
  • Loading branch information
egonSchiele authored and spf13 committed Mar 21, 2016
1 parent 02effd9 commit c42982f
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 @@ -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)
}
}
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 c42982f

Please sign in to comment.