27 ms·
Learn to use the DOM instead of HTML strings, and you'll almost never run into those XSS problems. You can replace all of your HTML sanitization functions with
by Sephr 16y ago
Learn to use the DOM instead of HTML strings, and you'll almost never run into those XSS problems. You can replace all of your HTML sanitization functions with document.createTextNode(text).
- Figs 16y agoI think you're looking for a different thread...
- paraschopra 16y agoNo, given how cryptic the original post looked to me, the comment looks absolutely spot on!
- Sephr 16y agoOops, I meant to reply in the thread about that node.js chat application full of XSS holes.