From bfcf113ce7e4293c955fd76e51e4515f29232b94 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Sat, 1 Jun 2013 16:47:34 +0200 Subject: [PATCH] Forgot typeof condition --- core/js/octemplate.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/js/octemplate.js b/core/js/octemplate.js index 352a23c4dc..e69c6cc56e 100644 --- a/core/js/octemplate.js +++ b/core/js/octemplate.js @@ -61,7 +61,9 @@ if(typeof this.options.escapeFunction === 'function') { for (var key = 0; key < this.vars.length; key++) { - this.vars[key] = self.options.escapeFunction(this.vars[key]); + if(typeof this.vars[key] === 'string') { + this.vars[key] = self.options.escapeFunction(this.vars[key]); + } } }