diff --git a/templates/webadmin/base.html b/templates/webadmin/base.html
index 36fc8c5a..a5a5aaaf 100644
--- a/templates/webadmin/base.html
+++ b/templates/webadmin/base.html
@@ -265,8 +265,21 @@ along with this program. If not, see .
diff --git a/templates/webclient/files.html b/templates/webclient/files.html
index ee4deac4..38c59cc6 100644
--- a/templates/webclient/files.html
+++ b/templates/webclient/files.html
@@ -239,7 +239,7 @@ along with this program. If not, see .
if (childReference == null || childReference.closed) {
childProps.set('link', fileLink);
childProps.set('url', url);
- childProps.set('file_name', fileName);
+ childProps.set('file_name', UnicodeDecodeB64(fileName));
childReference = window.open(url, '_blank');
if (!checkerStarted){
keepAlive();
@@ -366,7 +366,7 @@ along with this program. If not, see .
async function saveBlob() {
var errorMessage = "Error saving external file";
- var uploadPath = '{{.FileURL}}?path={{.CurrentDir}}'+encodeURIComponent("/"+childProps.get('file_name'));
+ var uploadPath = '{{.FileURL}}?path={{.CurrentDir}}'+encodeURIComponent("/"+unescapeHTML(childProps.get('file_name')));
let response;
try {
response = await fetch(uploadPath, {
@@ -447,7 +447,7 @@ along with this program. If not, see .
}
function openVideoPlayer(name, url, videoType){
- $("#video_title").text(name);
+ $("#video_title").text(UnicodeDecodeB64(name));
$('#videoModal').modal('show');
player.src({
type: videoType,
@@ -995,8 +995,9 @@ along with this program. If not, see .
var title = "";
var cssClass = "";
var shortened = shortenData(data, 70);
+ data = escapeHTML(data);
if (shortened != data){
- title = escapeHTML(data);
+ title = data;
cssClass = "ellipsis";
}
@@ -1017,7 +1018,7 @@ along with this program. If not, see .
{ "data": "edit_url",
"render": function (data, type, row) {
if (type === 'display') {
- var filename = row["name"];
+ var filename = escapeHTML(row["name"]);
var extension = filename.slice((filename.lastIndexOf(".") - 1 >>> 0) + 2).toLowerCase();
if (data){
if (extension == "csv" || extension == "bat" || CodeMirror.findModeByExtension(extension) != null){
@@ -1039,15 +1040,19 @@ along with this program. If not, see .
case "svg":
case "ico":
var view_url = row['url']+"&inline=1";
- return ``;
+ var title = escapeHTMLForceSafe(row["name"])
+ return ``;
case "mp4":
case "mov":
- return ``;
+ var name = b64EncodeUnicode(row["name"]);
+ return ``;
case "webm":
- return ``;
+ var name = b64EncodeUnicode(row["name"]);
+ return ``;
case "ogv":
case "ogg":
- return ``;
+ var name = b64EncodeUnicode(row["name"]);
+ return ``;
case "pdf":
if (PDFObject.supportsPDFs){
var view_url = row['url'];
@@ -1065,7 +1070,8 @@ along with this program. If not, see .
{{if .HasIntegrations}}
if (type === 'display') {
if (data){
- return ``;
+ var name = b64EncodeUnicode(escapeHTML(row["name"]));
+ return ``;
}
}
{{end}}
diff --git a/templates/webclient/sharefiles.html b/templates/webclient/sharefiles.html
index 2797c7fb..1370dfdb 100644
--- a/templates/webclient/sharefiles.html
+++ b/templates/webclient/sharefiles.html
@@ -94,26 +94,17 @@ along with this program. If not, see .