Fixed _.template() HTML escaping for when _ isn't in scope, due

to noConflict() and minification.
This commit is contained in:
Neil E. Pearson
2011-10-25 16:40:50 +11:00
parent 29f4478a86
commit ad65e8cb03

View File

@@ -899,8 +899,8 @@
.replace(/\n/g, '\\n')
.replace(/\t/g, '\\t')
+ "');}return __p.join('');";
var func = new Function('obj', tmpl);
return data ? func(data) : func;
var func = new Function('obj', '_', tmpl);
return data ? func(data, _) : function(data) { return func(data, _) };
};
// The OOP Wrapper