Skip to content

Commit

Permalink
Fix Post-rendering bug
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cfstras committed Jan 13, 2014
1 parent 23a17bd commit a9d34c3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});

/**
Expand Down

0 comments on commit a9d34c3

Please sign in to comment.