Speed up octemplate rendering.

This commit is contained in:
Thomas Tanghus 2013-06-01 16:38:35 +02:00
parent d636e168a6
commit 64c9fdcc28
1 changed files with 3 additions and 5 deletions

View File

@ -60,11 +60,9 @@
var self = this;
if(typeof this.options.escapeFunction === 'function') {
$.each(this.vars, function(key, val) {
if(typeof val === 'string') {
self.vars[key] = self.options.escapeFunction(val);
}
});
for (var key = 0; key < this.vars.length; key++) {
this.vars[key] = self.options.escapeFunction(this.vars[key]);
}
}
var _html = this._build(this.vars);