Better looking slash characters

This commit is contained in:
Logan G 2025-01-03 23:49:17 -07:00
parent d844081d19
commit d696911ac4
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -63,14 +63,14 @@ func copyFile(src, dst string) (error) {
func replaceDelimiters(input string) string { func replaceDelimiters(input string) string {
replacer := strings.NewReplacer( replacer := strings.NewReplacer(
"/", "", "/", "",
"\\", "", "\\", "",
) )
return replacer.Replace(input) return replacer.Replace(input)
} }
func sanitizeFilename(filename string) string { func sanitizeFilename(filename string) string {
invalidFilenameChars := regexp.MustCompile(`[^a-zA-Z0-9._-[[:blank:]]]+`) invalidFilenameChars := regexp.MustCompile(`[^a-zA-Z0-9._-[[:blank:]]]+`)
sanitized := invalidFilenameChars.ReplaceAllString(filename, "-") sanitized := invalidFilenameChars.ReplaceAllString(filename, "-")