]> source.dussan.org Git - nextcloud-server.git/commitdiff
Speed up octemplate rendering.
authorThomas Tanghus <thomas@tanghus.net>
Sat, 1 Jun 2013 14:38:35 +0000 (16:38 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Sat, 1 Jun 2013 14:38:35 +0000 (16:38 +0200)
core/js/octemplate.js

index e032506c0b1b3c93f5d3a116a868fe2d581d02bf..352a23c4dc78ae53bc7e699b186056e7ff819ecc 100644 (file)
                        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);