embroider-build / content-tag

A rust program that uses my swc fork to parse GJS
MIT License
7 stars 7 forks source link

JS escapes are interpreted in hbs #26

Closed ef4 closed 9 months ago

ef4 commented 9 months ago

In handlebars, escapes like \n or \u1234 don't have any special meaning. If you use them in an .hbs file, they render as written. But if you convert that .hbs file to a template-tag, they are inserted directly into a Javascript string literal (or template literal) where they get interpreted, changing the rendered output.

This is not a bug unique to content-tag, the earlier ember-template-imports implementation also suffers this.