diff --git a/lib/josi/templating.js b/lib/josi/templating.js index 8c847ca..9b1234a 100644 --- a/lib/josi/templating.js +++ b/lib/josi/templating.js @@ -75,8 +75,8 @@ this.jQueryTemplatingEngine = TemplatingEngine.extend({ var tmplcmd = { 'each': { _default: [null, "$i"], - prefix: "$1.forEach(function($2){with(this){", - suffix: "}});" + prefix: "for(var $2 in $1){", + suffix: "}" }, 'if': { prefix: "if($1){", @@ -85,13 +85,9 @@ this.jQueryTemplatingEngine = TemplatingEngine.extend({ 'else': { prefix: "}else{" }, - 'html': { - prefix: "_.push(typeof $1==='function'?$1.call(this):$1);" - }, '=': { _default: ["this"], prefix: "_.push(typeof $1==='function'?$1.call(this):$1);" - // prefix: "_.push($.encode(typeof $1==='function'?$1.call(this):$1));" } }; var fn = new Function("$data",