From fb90d17304800634115808bd5470ae019f99d7e4 Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Fri, 9 Jan 2026 22:10:19 -0500 Subject: [PATCH] fix(author): sanitize special characters from output filenames MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extended sanitizeForPath to remove additional special characters: - Apostrophes (') - Double quotes (") - Backticks (`) - Exclamation marks (!) - Question marks (?) - Ampersands (&) → "and" Before: ifuckedmybestfriend'sgirlfriend.iso After: ifuckedmybestfriendsgirlfriend.iso This prevents filesystem issues and improves filename compatibility across different operating systems and file sharing platforms. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- upscale_module.go | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/upscale_module.go b/upscale_module.go index e42dc97..e7b2f0b 100644 --- a/upscale_module.go +++ b/upscale_module.go @@ -154,7 +154,24 @@ func buildUpscaleFilter(targetWidth, targetHeight int, method string, preserveAs // sanitizeForPath creates a simple slug for filenames from user-visible labels func sanitizeForPath(label string) string { - r := strings.NewReplacer(" ", "", "(", "", ")", "", "×", "x", "/", "-", "\\", "-", ":", "-", ",", "", ".", "", "_", "") + r := strings.NewReplacer( + " ", "", + "(", "", + ")", "", + "×", "x", + "/", "-", + "\\", "-", + ":", "-", + ",", "", + ".", "", + "_", "", + "'", "", + "\"", "", + "`", "", + "!", "", + "?", "", + "&", "and", + ) return strings.ToLower(r.Replace(label)) }