From c1912a12e00b3ac541f5d6778248c6f1d7c83692 Mon Sep 17 00:00:00 2001 From: Akhil Gupta Date: Tue, 2 Feb 2021 06:28:12 +0530 Subject: [PATCH] better file name fix --- internal/sanitize/sanitize.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/sanitize/sanitize.go b/internal/sanitize/sanitize.go index b6b9dd3..1580ce0 100644 --- a/internal/sanitize/sanitize.go +++ b/internal/sanitize/sanitize.go @@ -350,7 +350,7 @@ func cleanAttributes(a []parser.Attribute, allowed []string) []parser.Attribute // A list of characters we consider separators in normal strings and replace with our canonical separator - rather than removing. var ( - separators = regexp.MustCompile(`[ &_=+:]`) + separators = regexp.MustCompile(`[!&_=+:]`) dashes = regexp.MustCompile(`[\-]+`) ) @@ -366,7 +366,7 @@ func cleanString(s string, r *regexp.Regexp) string { s = Accents(s) // Replace certain joining characters with a dash - //s = separators.ReplaceAllString(s, "-") + s = separators.ReplaceAllString(s, "-") // Remove all other unrecognised characters - NB we do allow any printable characters //s = r.ReplaceAllString(s, "")