From 0711a683bd9ad2b8e8207cbe7043b20d6fdc59b9 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Thu, 30 Oct 2025 15:49:58 +0100 Subject: [PATCH] Safely handle odd chars in filenames Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --- scripts/download-katex-assets.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/download-katex-assets.sh b/scripts/download-katex-assets.sh index e5156710..12be7d91 100755 --- a/scripts/download-katex-assets.sh +++ b/scripts/download-katex-assets.sh @@ -36,6 +36,6 @@ install -vm644 "$tmp_dir/katex/katex.min.css" "$root/static/css/katex.min.css" # Remove any existing fonts and move the new ones into place. rm -rvf "$root"/static/css/fonts/KaTeX* -while read -r file; do +while IFS= read -r -d '' file; do install -vm644 "$file" "$root/static/css/fonts" -done < <(find "$tmp_dir/katex/fonts" -maxdepth 1 -name "KaTeX*.woff2") +done < <(find "$tmp_dir/katex/fonts" -maxdepth 1 -name "KaTeX*.woff2" -print0)