From 6a83ebdcd78867c005e4d0d9f2485412e95d7740 Mon Sep 17 00:00:00 2001 From: "juancarlos.cavero" Date: Thu, 30 Apr 2026 07:05:27 +0200 Subject: [PATCH] fix: Strip '#' from sanitized filenames to prevent broken clip URLs YouTube titles containing '#' (e.g. hashtags like #shorts) were saved to disk correctly, but the browser parses '#' as a URL fragment, so the frontend could never request the actual file and clips appeared missing. Add '#' to the regex in sanitize_filename(). Co-Authored-By: Claude Opus 4.7 (1M context) --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 2d30001..03cf551 100644 --- a/main.py +++ b/main.py @@ -444,7 +444,7 @@ def get_video_resolution(video_path): def sanitize_filename(filename): """Remove invalid characters from filename.""" - filename = re.sub(r'[<>:"/\\|?*]', '', filename) + filename = re.sub(r'[<>:"/\\|?*#]', '', filename) filename = filename.replace(' ', '_') return filename[:100]