The regex that escapes the HTML angular template doesn't account for all scenarios -- in particular, when there's already a backslash-escaped single quote (\') in the HTML template (in my case, present in an ng-click handler).
Since this is one of those fiddly things that's difficult to get right, I find it easier to use a library. I have a fork where I swapped the escape code for js-string-escape which addresses the issue. It's here:
The regex that escapes the HTML angular template doesn't account for all scenarios -- in particular, when there's already a backslash-escaped single quote (\') in the HTML template (in my case, present in an ng-click handler).
Since this is one of those fiddly things that's difficult to get right, I find it easier to use a library. I have a fork where I swapped the escape code for js-string-escape which addresses the issue. It's here:
https://github.com/wiltzius/angularjs-templates-brunch
I've also merged the changes from https://github.com/pavanpaik/angularjs-templates-brunch which add a
base
configuration option.Are you interested in a pull request?