Re:Show HN: Brutal.js – a small framework for building bruta...
by franciscop on Monday July 09, 2018 @07:02PM
(#17494118)
Ah cool, that works as well from a security point of view. I slightly prefer throwing, but that is highly opinionated.
Let's consider a container where a function like `header` would be used:
If you use the safe version, you might get: but if you use the unsafe version, you'd get: See a demo here: https://stackblitz.com/edit/lit-html-escaping?file=index.js