This commit is contained in:
kpdecker
2013-08-24 12:11:26 -05:00
parent 0af54b1142
commit 7e16d6cb0d
2 changed files with 10 additions and 8 deletions
+5 -4
View File
@@ -96,10 +96,9 @@ Handlebars.registerHelper('blockHelperMissing', function(context, options) {
Handlebars.K = function() {};
Handlebars.createFrame = Object.create || function(object) {
Handlebars.K.prototype = object;
var obj = new Handlebars.K();
Handlebars.K.prototype = null;
Handlebars.createFrame = function(object) {
var obj = {};
Handlebars.Utils.extend(obj, object);
return obj;
};
@@ -842,6 +841,8 @@ Handlebars.Utils = {
},
escapeExpression: function(string) {
/*jshint eqnull: true */
// don't escape SafeStrings, since they're already safe
if (string instanceof Handlebars.SafeString) {
return string.toString();
+5 -4
View File
@@ -96,10 +96,9 @@ Handlebars.registerHelper('blockHelperMissing', function(context, options) {
Handlebars.K = function() {};
Handlebars.createFrame = Object.create || function(object) {
Handlebars.K.prototype = object;
var obj = new Handlebars.K();
Handlebars.K.prototype = null;
Handlebars.createFrame = function(object) {
var obj = {};
Handlebars.Utils.extend(obj, object);
return obj;
};
@@ -231,6 +230,8 @@ Handlebars.Utils = {
},
escapeExpression: function(string) {
/*jshint eqnull: true */
// don't escape SafeStrings, since they're already safe
if (string instanceof Handlebars.SafeString) {
return string.toString();