Added htmlescape function
This commit is contained in:
parent
e455b88de9
commit
29559c378f
|
@ -17,6 +17,14 @@ function html2text(html) {
|
||||||
return result;
|
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) {
|
function loadScript(id, file, cback) {
|
||||||
cback = cback || function() {};
|
cback = cback || function() {};
|
||||||
if (document.getElementById(id) !== null)
|
if (document.getElementById(id) !== null)
|
||||||
|
|
Loading…
Reference in New Issue