mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Use textContent to avoid manual escaping
This commit is contained in:
parent
2913e13a30
commit
b24fac3dd8
@ -1297,7 +1297,7 @@ RED.view = (function() {
|
||||
sp.className = className;
|
||||
sp.style.position = "absolute";
|
||||
sp.style.top = "-1000px";
|
||||
sp.innerHTML = (str||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
|
||||
sp.textContent = (str||"");
|
||||
document.body.appendChild(sp);
|
||||
var w = sp.offsetWidth;
|
||||
document.body.removeChild(sp);
|
||||
|
Loading…
Reference in New Issue
Block a user