News for hackers. Stuff that matters.
Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by Aachen on Tuesday February 24, 2026 @10:15AM (#47138212)
> maybe third time could be the charm: it's for preventing XSS holes

That information is in the question, so sadly no this still doesn't make sense to me because I don't understand any scenario in which this is what the developer wants. You always still need more code (to filter the right tags) or can just use textContent (separating data and code completely, imo the recommended solution)

> Maybe you meant .innerHTML? .innerText AFAIK doesn't try to parse HTML (why would it?)

No, I didn't mean that, yes it does, and no I don't know why it is this way. If you don't believe me and don't want to check it out for yourself, I'm not sure what more I can say

Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by lelanthran on Tuesday February 24, 2026 @01:36PM (#47140795)
> I don't understand any scenario in which this is what the developer wants.

Client-side includes.