diff --git a/web/src/app/js/base.js b/web/src/app/js/base.js index b09ac1b..11a4a32 100644 --- a/web/src/app/js/base.js +++ b/web/src/app/js/base.js @@ -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)