Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Umm, how do the templates escape malicious input (XSS)?


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.

[1]: https://lit.dev/docs/api/directives/#unsafeHTML


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...




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: