Browse Source

[WebUI] Escape HTML characters in errors history

pull/4913/head
moisseev 3 weeks ago
parent
commit
126584384e
2 changed files with 5 additions and 3 deletions
  1. 4
    0
      interface/js/app/history.js
  2. 1
    3
      interface/js/app/libft.js

+ 4
- 0
interface/js/app/history.js View File

@@ -262,6 +262,10 @@ define(["jquery", "app/common", "app/libft", "footable"],
sortValue: item.ts
}
};
for (const prop in item) {
if (!{}.hasOwnProperty.call(item, prop)) continue;
if (typeof item[prop] === "string") item[prop] = common.escapeHTML(item[prop]);
}
});
if (Object.prototype.hasOwnProperty.call(common.tables, "errors")) {
common.tables.errors.rows.load(rows);

+ 1
- 3
interface/js/app/libft.js View File

@@ -491,9 +491,7 @@ define(["jquery", "app/common", "footable"],
});
break;
default:
if (typeof item[prop] === "string") {
item[prop] = common.escapeHTML(item[prop]);
}
if (typeof item[prop] === "string") item[prop] = common.escapeHTML(item[prop]);
}
}


Loading…
Cancel
Save