dustjs icon indicating copy to clipboard operation
dustjs copied to clipboard

Non-string types are handled inconsistently between javascript and html escaping

Open tomalexander opened this issue 5 years ago • 0 comments

With the template

{name|h|js}{~n}
{name|j|js}{~n}

and the context

{"name": true}

You get the output

"true"
true

So it seems that html escaping turns non-string types into string, but javascript escaping does not.

tomalexander avatar May 24 '20 02:05 tomalexander