40
rated 0 times
[
44]
[
4]
/ answers: 1 / hits: 18185
/ 10 Years ago, fri, february 28, 2014, 12:00:00
HTML and Handlebars:
onclick='shareItem({{name}})'>
Does not successfully pass a safely escaped name when it has double quotes in it.
onclick=shareItem('{{name}}')>
Does not successfully pass a safely escaped name when it has single quotes in it.
I need to handle both eventualities- and even in the same string.
It feels sloppy to have to define a JS variable and pass it to a backslash adder.
Is there a cleaner way to do this with Handlebars or Moustache?
More From » html