diff --git a/app/assets/javascripts/discourse/helpers/raw.js.es6 b/app/assets/javascripts/discourse/helpers/raw.js.es6 index 8aaa506e566..b65dbd8f628 100644 --- a/app/assets/javascripts/discourse/helpers/raw.js.es6 +++ b/app/assets/javascripts/discourse/helpers/raw.js.es6 @@ -3,9 +3,6 @@ Handlebars.registerHelper('raw', function(property, options) { template = Discourse.__container__.lookup('template:' + templateName), params = options.hash; - // {{raw}} helper is broken! - return; - if (!template) { Ember.warn('Could not find raw template: ' + templateName); return; diff --git a/app/assets/javascripts/discourse/lib/ember_compat_handlebars.js b/app/assets/javascripts/discourse/lib/ember_compat_handlebars.js index 35fce3a147d..458db7cc51a 100644 --- a/app/assets/javascripts/discourse/lib/ember_compat_handlebars.js +++ b/app/assets/javascripts/discourse/lib/ember_compat_handlebars.js @@ -14,7 +14,7 @@ }; - var RawHandlebars = objectCreate(Handlebars); + var RawHandlebars = Handlebars.create(); RawHandlebars.helper = function() {}; RawHandlebars.helpers = objectCreate(Handlebars.helpers); @@ -59,7 +59,6 @@ if ( !(mustache.params.length || mustache.hash)) { var id = new Handlebars.AST.IdNode([{ part: 'get' }]); - mustache = new Handlebars.AST.MustacheNode([id].concat([mustache.id]), mustache.hash, mustache.escaped); } @@ -92,6 +91,7 @@ var templateSpec = new RawHandlebars.JavaScriptCompiler().compile(environment, options, undefined, true); var template = RawHandlebars.template(templateSpec); + template.isMethod = false; return template; };