Commit a776386
committed
Fix problem with multi-line comments breaking compileAngularTemplates step due to invalid JS generated for the template
The issue was introduced in a47ecc2. When a ng.html file contains multi-line comments Meteor failed on the console with error like "Unexpected token ILLEGAL" due to the generated JS that adds the html to the template cache was broken.
For example this could break your app:
```
<div>
<!--
<div>
Containing comments on multiple lines breaks the build
</div>
-->
</div>
```
In order to properly fix that - the best future proof approach is to JSON.stringify the strings as this ensures any JS special character is properly escaped and turned into string literal.1 parent 2792b98 commit a776386
File tree
2 files changed
+3
-3
lines changed- .docs/angular-meteor/client/views
- plugin
2 files changed
+3
-3
lines changedWhitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments