diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java index a1f4f59c..0a93bf1d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java @@ -75,7 +75,7 @@ public class ShowJavascript { return WebResponseUtils.bytesToWebResponse( script.getBytes(StandardCharsets.UTF_8), - inputFile.getOriginalFilename() + ".js"); + Filenames.toSimpleFileName(inputFile.getOriginalFilename()) + ".js"); } } }