From f48c7081eb2cd0733e55ea52654101fdc1a0f9a4 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Fri, 21 Sep 2012 13:09:55 +0100 Subject: [PATCH] Ensure binding attributes that end with a '}' character don't cause syntax errors --- src/templating/templateRewriting.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templating/templateRewriting.js b/src/templating/templateRewriting.js index afab32091..1cc8c62ed 100644 --- a/src/templating/templateRewriting.js +++ b/src/templating/templateRewriting.js @@ -30,7 +30,7 @@ ko.templateRewriting = (function () { // anonymous function, even though Opera's built-in debugger can evaluate it anyway. No other browser requires this // extra indirection. var applyBindingsToNextSiblingScript = - "ko.__tr_ambtns(function(){return(function(){return{" + rewrittenDataBindAttributeValue + "} })()})"; + "ko.__tr_ambtns(function(){return(function(){return{ " + rewrittenDataBindAttributeValue + " } })()})"; return templateEngine['createJavaScriptEvaluatorBlock'](applyBindingsToNextSiblingScript) + tagToRetain; }