mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 02:22:40 +08:00
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:
@ -7,9 +7,10 @@
|
|||||||
Handlebars.registerHelper('breakUp', function(property, hint, options) {
|
Handlebars.registerHelper('breakUp', function(property, hint, options) {
|
||||||
var prop = Ember.Handlebars.get(this, property, options);
|
var prop = Ember.Handlebars.get(this, property, options);
|
||||||
if (!prop) return "";
|
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));
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user