Improve fcn_sanitizeHTML()
This commit is contained in:
parent
1575442482
commit
cf8ef67497
4
js/complete.min.js
vendored
4
js/complete.min.js
vendored
File diff suppressed because one or more lines are too long
2
js/utility.min.js
vendored
2
js/utility.min.js
vendored
File diff suppressed because one or more lines are too long
@ -802,6 +802,7 @@ function fcn_sanitizeHTML(html) {
|
|||||||
const temp = document.createElement('div');
|
const temp = document.createElement('div');
|
||||||
|
|
||||||
temp.innerText = html instanceof HTMLElement ? html.innerHTML : html;
|
temp.innerText = html instanceof HTMLElement ? html.innerHTML : html;
|
||||||
|
temp.textContent = typeof html === 'string' ? html : html.textContent;
|
||||||
|
|
||||||
return temp.innerHTML;
|
return temp.innerHTML;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user