3 ms·
Shouldn’t these concerns be easily solved by attaching strings to the DOM using the DOM methods like textContent and setAttribute? If that isn’t enough shouldn’
by austincheney 5y ago
Shouldn’t these concerns be easily solved by attaching strings to the DOM using the DOM methods like textContent and setAttribute? If that isn’t enough shouldn’t it also be solved with something like:
string.replace(/&/g, “&”)
.replace(/</g, “<”)
.replace(/>/g, “$gt;”);