diff --git a/server/src/main/resources/web/ofd.ftl b/server/src/main/resources/web/ofd.ftl index 69b25236..df6fbde4 100644 --- a/server/src/main/resources/web/ofd.ftl +++ b/server/src/main/resources/web/ofd.ftl @@ -15,7 +15,7 @@ var url = '${currentUrl}'; var baseUrl = '${baseUrl}'.endsWith('/') ? '${baseUrl}' : '${baseUrl}' + '/'; if (!url.startsWith(baseUrl)) { - url = baseUrl + 'getCorsFile?urlPath=' + encodeURIComponent(url); + url = baseUrl + 'getCorsFile?urlPath=' + encodeURIComponent(Base64.encode(url)); } document.getElementsByTagName('iframe')[0].src = "${baseUrl}ofd/index.html?file="+ encodeURIComponent(url)+""; document.getElementsByTagName('iframe')[0].height = document.documentElement.clientHeight - 10; diff --git a/server/src/main/resources/web/tiff.ftl b/server/src/main/resources/web/tiff.ftl index 823b047c..38eb5ae1 100644 --- a/server/src/main/resources/web/tiff.ftl +++ b/server/src/main/resources/web/tiff.ftl @@ -58,17 +58,6 @@ loadOne(); } - function doPrint() { - bdhtml=window.document.body.innerHTML; - sprnstr=""; - eprnstr=""; - prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); - prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); - window.document.body.innerHTML=prnhtml; - initWaterMark(); - window.print(); - } - String.prototype.startsWithh = function(str) { var reg = new RegExp("^" + str); return reg.test(this); @@ -82,7 +71,7 @@ var url = '${finalUrl}'; var baseUrl = '${baseUrl}'.endsWithh('/') ? '${baseUrl}' : '${baseUrl}' + '/'; if (!url.startsWithh(baseUrl)) { - url = baseUrl + 'getCorsFile?urlPath=' + encodeURIComponent(url); + url = baseUrl + 'getCorsFile?urlPath=' + encodeURIComponent(Base64.encode(url)); } const xhr = new XMLHttpRequest(); xhr.open('GET', url);