summaryrefslogtreecommitdiffstats
path: root/core/js/octemplate.js
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2013-06-01 16:38:35 +0200
committerThomas Tanghus <thomas@tanghus.net>2013-06-01 16:38:35 +0200
commit64c9fdcc28333c7310df8d9efb9040dbe3b4f8c8 (patch)
treeca93f8c45e31e82c9bcc63a4bb43a634559a31a5 /core/js/octemplate.js
parentd636e168a6c043ddae730f7cdaaee772b1067793 (diff)
downloadnextcloud-server-64c9fdcc28333c7310df8d9efb9040dbe3b4f8c8.tar.gz
nextcloud-server-64c9fdcc28333c7310df8d9efb9040dbe3b4f8c8.zip
Speed up octemplate rendering.
Diffstat (limited to 'core/js/octemplate.js')
-rw-r--r--core/js/octemplate.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/js/octemplate.js b/core/js/octemplate.js
index e032506c0b1..352a23c4dc7 100644
--- a/core/js/octemplate.js
+++ b/core/js/octemplate.js
@@ -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);