Added htmlescape function

This commit is contained in:
Niko 2022-02-14 01:23:21 +01:00
parent e455b88de9
commit 29559c378f
1 changed files with 8 additions and 0 deletions

View File

@ -17,6 +17,14 @@ function html2text(html) {
return result;
}
function htmlescape(html) {
var e = document.createElement('div');
e.innerText = html;
const result = e.innerHTML;
e.remove();
return result;
}
function loadScript(id, file, cback) {
cback = cback || function() {};
if (document.getElementById(id) !== null)