1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-06 01:12:03 +00:00

fixup for i18n; avoid XSS

- fixup for PR#5256
This commit is contained in:
llj
2022-10-09 18:32:03 +08:00
parent c924f1015b
commit a14e45ca96
9 changed files with 23 additions and 66 deletions

View File

@@ -231,6 +231,18 @@ export const Utils = {
.innerHTML;
},
generateDialogTitle: function(title, operationTarget) {
/*
* @param title: gettext('...{placeholder}...')
*/
/*
const targetStr = this.HTMLescape(operationTarget);
const str = `<span class="op-target ellipsis ellipsis-op-target" title=${targetStr}>${targetStr}</span>`;
return title.replace('{placeholder}', str);
*/
return title.replace('{placeholder}', operationTarget);
},
getFileName: function(filePath) {
let lastIndex = filePath.lastIndexOf('/');
return filePath.slice(lastIndex+1);