Hacker News new | ask | show | jobs
by ec109685 1118 days ago
Unless the template is aware of the semantics of the html being output, it can’t always know how to escape. E.g. the escaping rules are different for a css variable embedded in an inline style compared to using it in a javascript context.

That is what made JSX so neat.

1 comments

and modern templating systems do! https://pkg.go.dev/html/template

> This package understands HTML, CSS, JavaScript, and URIs.

No JSX needed.