From 28f8485c8734ea41bbfa9a84865224cced670e66 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 7 Feb 2014 15:12:01 -0500 Subject: [PATCH] Updated to 1.3.2 --- index.html | 2 +- js/libs/{ember-1.3.1.js => ember-1.3.2.js} | 61 +++++++++++++--------- 2 files changed, 38 insertions(+), 25 deletions(-) rename js/libs/{ember-1.3.1.js => ember-1.3.2.js} (99%) diff --git a/index.html b/index.html index 7f29ac6..0b45928 100755 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@

Welcome to Ember.js

- + diff --git a/js/libs/ember-1.3.1.js b/js/libs/ember-1.3.2.js similarity index 99% rename from js/libs/ember-1.3.1.js rename to js/libs/ember-1.3.2.js index dc4bb50..7354389 100644 --- a/js/libs/ember-1.3.1.js +++ b/js/libs/ember-1.3.2.js @@ -5,7 +5,7 @@ * Portions Copyright 2008-2011 Apple Inc. All rights reserved. * @license Licensed under MIT license * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 1.3.1 + * @version 1.3.2 */ @@ -203,7 +203,7 @@ if (!Ember.testing) { * Portions Copyright 2008-2011 Apple Inc. All rights reserved. * @license Licensed under MIT license * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 1.3.1 + * @version 1.3.2 */ @@ -286,7 +286,7 @@ var define, requireModule, require, requirejs; @class Ember @static - @version 1.3.1 + @version 1.3.2 */ if ('undefined' === typeof Ember) { @@ -313,10 +313,10 @@ Ember.toString = function() { return "Ember"; }; /** @property VERSION @type String - @default '1.3.1' + @default '1.3.2' @static */ -Ember.VERSION = '1.3.1'; +Ember.VERSION = '1.3.2'; /** Standard environmental variables. You can define these in a global `EmberENV` @@ -26501,6 +26501,33 @@ var handlebarsGet = Ember.Handlebars.get = function(root, path, options) { return value; }; +/** + This method uses `Ember.Handlebars.get` to lookup a value, then ensures + that the value is escaped properly. + + If `unescaped` is a truthy value then the escaping will not be performed. + + @method getEscaped + @for Ember.Handlebars + @param {Object} root The object to look up the property on + @param {String} path The path to be lookedup + @param {Object} options The template's option hash +*/ +Ember.Handlebars.getEscaped = function(root, path, options) { + var result = handlebarsGet(root, path, options); + + if (result === null || result === undefined) { + result = ""; + } else if (!(result instanceof Handlebars.SafeString)) { + result = String(result); + } + if (!options.hash.unescaped){ + result = Handlebars.Utils.escapeExpression(result); + } + + return result; +}; + Ember.Handlebars.resolveParams = function(context, params, options) { var resolvedParams = [], types = options.types, param, type; @@ -27458,6 +27485,7 @@ Ember._HandlebarsBoundView = Ember._MetamorphView.extend({ var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt; var handlebarsGet = Ember.Handlebars.get, normalizePath = Ember.Handlebars.normalizePath; +var handlebarsGetEscaped = Ember.Handlebars.getEscaped; var forEach = Ember.ArrayPolyfills.forEach; var o_create = Ember.create; @@ -27467,20 +27495,6 @@ function exists(value) { return !Ember.isNone(value); } -function sanitizedHandlebarsGet(currentContext, property, options) { - var result = handlebarsGet(currentContext, property, options); - if (result === null || result === undefined) { - result = ""; - } else if (!(result instanceof Handlebars.SafeString)) { - result = String(result); - } - if (!options.hash.unescaped){ - result = Handlebars.Utils.escapeExpression(result); - } - - return result; -} - // Binds a property into the DOM. This will create a hook in DOM that the // KVO system will look for and update if the property changes. function bind(property, options, preserveContext, shouldDisplay, valueNormalizer, childProperties) { @@ -27551,7 +27565,7 @@ function bind(property, options, preserveContext, shouldDisplay, valueNormalizer } else { // The object is not observable, so just render it out and // be done with it. - data.buffer.push(handlebarsGet(currentContext, property, options)); + data.buffer.push(handlebarsGetEscaped(currentContext, property, options)); } } @@ -27572,7 +27586,7 @@ function simpleBind(currentContext, property, options) { Ember.run.once(view, 'rerender'); }; - output = sanitizedHandlebarsGet(currentContext, property, options); + output = handlebarsGetEscaped(currentContext, property, options); data.buffer.push(output); } else { @@ -27598,8 +27612,7 @@ function simpleBind(currentContext, property, options) { } else { // The object is not observable, so just render it out and // be done with it. - output = sanitizedHandlebarsGet(currentContext, property, options); - + output = handlebarsGetEscaped(currentContext, property, options); data.buffer.push(output); } } @@ -36169,7 +36182,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) { if (linkType === 'ID') { options.linkTextPath = linkTitle; options.fn = function() { - return Ember.Handlebars.get(context, linkTitle, options); + return Ember.Handlebars.getEscaped(context, linkTitle, options); }; } else { options.fn = function() {