Fix Post-rendering bug

Ember.Handlebars.normalizePath was being called with an object as
argument which caused it to error out.
also wrapped the return in a SafeString, so the html will not get
escaped again.
This commit is contained in:
Claus Strasburger 2014-01-13 13:29:19 +01:00
parent 23a17bd76d
commit a9d34c3589

View file

@ -7,9 +7,10 @@
Handlebars.registerHelper('breakUp', function(property, hint, options) {
var prop = Ember.Handlebars.get(this, property, options);
if (!prop) return "";
hint = Ember.Handlebars.get(this, hint, options);
if (typeof(hint) !== 'string') hint = property;
return Discourse.Formatter.breakUp(prop, hint);
hint = Ember.Handlebars.get(this, hint, options);
return new Handlebars.SafeString(Discourse.Formatter.breakUp(prop, hint));
});
/**