[desktop] fix bug 75962

This commit is contained in:
maxkadushkin
2025-10-03 17:04:12 +03:00
parent 59b395db1d
commit f634ca757f
2 changed files with 5 additions and 4 deletions

View File

@ -543,6 +543,7 @@ define([
const _f_ = rawarray[i];
if ( utils.matchFileFormat( _f_.type ) ) {
if (_re_name.test(_f_.path)) {
_f_.path = $('<div>').html(_f_.path);
const name = _re_name.exec(_f_.path)[1],
dir = _f_.path.slice(0, _f_.path.length - name.length - 1);
@ -550,9 +551,9 @@ define([
fileid: _f_.id,
type: _f_.type,
format: utils.parseFileFormat(_f_.type),
title: $('<div>').html(name).text(),
title: name,
url: _f_.path,
folder: $('<div>').html(dir).text(),
folder: dir,
});
}
}

View File

@ -84,8 +84,8 @@ define([
'<div class= <% if (typeof format !== "undefined") {%> "img-format-<%=format %>"<% } else {%> "svg-file-recent"<%} %>></div>',
'</div>',
'</div>',
'<div class="file-name"><% if (typeof title !== "undefined") {%><%= Common.Utils.String.htmlEncode(title || "") %><% } %></div>',
'<div class="file-info"><% if (typeof folder !== "undefined") {%><%= Common.Utils.String.htmlEncode(folder || "") %><% } %></div>',
'<div class="file-name"><% if (typeof title !== "undefined") {%><%= title || "" %><% } %></div>',
'<div class="file-info"><% if (typeof folder !== "undefined") {%><%= folder || "" %><% } %></div>',
'</div>'
].join(''))
});