Skip to content

Commit

Permalink
make you free of 'it.' etc. garbage
Browse files Browse the repository at this point in the history
  • Loading branch information
houd1ni committed Apr 20, 2016
1 parent 195025f commit 67da310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doT.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
.replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""): str)
.replace(/'|\\/g, "\\$&")
.replace(c.interpolate || skip, function(m, code) {
return cse.start + unescape(code) + cse.end;

This comment has been minimized.

Copy link
@epoberezkin

epoberezkin Oct 15, 2016

Do you realise that it breaks loop variables and other local variables in templates?

This comment has been minimized.

Copy link
@epoberezkin

epoberezkin Oct 15, 2016

There are no tests for loops

This comment has been minimized.

Copy link
@houd1ni

houd1ni Oct 16, 2016

Author Owner

Yes, it did. Realized but forgot :(

Thank you! I'll make tests for it this week. And, probably, some working example to avoid it.

This comment has been minimized.

Copy link
@houd1ni

houd1ni Oct 16, 2016

Author Owner

Just replaced the broken code for a while

return cse.start + c.varname + '.' + unescape(code) + cse.end;
})
.replace(c.encode || skip, function(m, code) {
needhtmlencode = true;
Expand Down

0 comments on commit 67da310

Please sign in to comment.