diff --git a/jodconverter-web/src/main/resources/static/pdfjs/web/viewer.js b/jodconverter-web/src/main/resources/static/pdfjs/web/viewer.js index 10a91c78..9c20bb2f 100644 --- a/jodconverter-web/src/main/resources/static/pdfjs/web/viewer.js +++ b/jodconverter-web/src/main/resources/static/pdfjs/web/viewer.js @@ -1897,7 +1897,7 @@ var validateFileURL = void 0; } var fileOrigin = new URL(file, window.location.href).origin; if (fileOrigin !== viewerOrigin) { - return '/getCorsFile?urlPath=' + file; + return '/getCorsFile?urlPath=' + encodeURIComponent(file); } } catch (ex) { var message = ex && ex.message;