Re:Show HN: Cami.js – A No Build, Web Component Based Reacti...
by aitchnyu on Tuesday November 07, 2023 @02:53AM
(#38174270)
Umm, how do the templates escape malicious input (XSS)?
[ Parent
| on HN ]
Re:Show HN: Cami.js – A No Build, Web Component Based Reacti...
by pabc1 on Tuesday November 07, 2023 @03:29AM
(#38174506)
It seems to be based on lit-html, so anything that's interpolated gets automatically sanitised unless you're using a directive[1] or interpolate other templates created using the "html" function.
Re:Show HN: Cami.js – A No Build, Web Component Based Reacti...
by kennyfrc on Tuesday November 07, 2023 @01:38PM
(#38180915)
I've mainly designed this for backend devs (i.e. rails, django people who just render plain html/css on the front-end), and we generally do HTML sanitization on the server side.
Example: https://api.rubyonrails.org/classes/ActionView/Helpers/Sanit...