Let's say we are passing initial data from php to Angular' view by Mustache, and the data is some string that contain quotes, like "Can't delete item".
Mustache by default translates the single quote to the '
like:
ng-init="message='Can't delete item'"
but that causes some kind of Angular parsing problem:
Lexer Error: Unterminated quote at columns ... ['] in expression [message='Can't delete item']
I can't use Mustache' triple curlies because then it will be like:
ng-init="message='Can't delete item'"
with the same error in output.
Plunk: http://plnkr.co/edit/GCq4gLrD1NxxCvAsjHy9?p=preview
How can we elegantly solve it on Mustache stage?