hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit c42982f76b397a5875114b59391712048e168348
parent 02effd9dc46201df250564cdbbee1ca2291eb8b4
Author: Aditya Bhargava <bluemangroupie@gmail.com>
Date:   Sat, 12 Mar 2016 15:48:21 -0800

Add '+' as one of the valid characters in urls specified in the front matter
Fixes #1290

Diffstat:
Mhelpers/path.go | 2+-
Mhelpers/path_test.go | 1+
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/helpers/path.go b/helpers/path.go
@@ -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)
 		}
 	}
diff --git a/helpers/path_test.go b/helpers/path_test.go
@@ -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 {