Don't try to escape or encode html when the null
This commit is contained in:
parent
adff18f54d
commit
67601001c1
|
@ -10,6 +10,8 @@ function isVisible(element) {
|
|||
}
|
||||
|
||||
function html2text(html) {
|
||||
if (html === undefined || html === null)
|
||||
return undefined;
|
||||
var e = document.createElement('div');
|
||||
e.innerHTML = html;
|
||||
const result = e.innerText;
|
||||
|
@ -18,6 +20,8 @@ function html2text(html) {
|
|||
}
|
||||
|
||||
function htmlescape(html) {
|
||||
if (html === undefined || html === null)
|
||||
return undefined;
|
||||
var e = document.createElement('div');
|
||||
e.innerText = html;
|
||||
const result = e.innerHTML;
|
||||
|
|
Loading…
Reference in New Issue