summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--helpers/path.go2
-rw-r--r--helpers/path_test.go1
2 files changed, 2 insertions, 1 deletions
diff --git a/helpers/path.go b/helpers/path.go
index ad2ff7658..b3f69ff90 100644
--- a/helpers/path.go
+++ b/helpers/path.go
@@ -102,7 +102,7 @@ func (p *PathSpec) UnicodeSanitize(s string) string {
)
for i, r := range source {
- isAllowed := r == '.' || r == '/' || r == '\\' || r == '_' || r == '#' || r == '+' || r == '~' || r == '-'
+ isAllowed := r == '.' || r == '/' || r == '\\' || r == '_' || r == '#' || r == '+' || r == '~' || r == '-' || r == '@'
isAllowed = isAllowed || unicode.IsLetter(r) || unicode.IsDigit(r) || unicode.IsMark(r)
isAllowed = isAllowed || (r == '%' && i+2 < len(source) && ishex(source[i+1]) && ishex(source[i+2]))
diff --git a/helpers/path_test.go b/helpers/path_test.go
index 3d0617f54..b8739f37a 100644
--- a/helpers/path_test.go
+++ b/helpers/path_test.go
@@ -57,6 +57,7 @@ func TestMakePath(t *testing.T) {
{"this+is+a+test", "this+is+a+test", false}, // Issue #1290
{"~foo", "~foo", false}, // Issue #2177
{"foo--bar", "foo--bar", true}, // Issue #7288
+ {"foo@bar", "foo@bar", true}, // Issue #10548
}
for _, test := range tests {