FIX: Censored words filter not applied to title.

This commit is contained in:
Guo Xiang Tan 2015-08-25 22:35:29 +08:00
parent 6a31a5d52b
commit 23b4d2d7d7

View File

@ -2,14 +2,17 @@ import { flushMap } from 'discourse/models/store';
import RestModel from 'discourse/models/rest'; import RestModel from 'discourse/models/rest';
import { propertyEqual } from 'discourse/lib/computed'; import { propertyEqual } from 'discourse/lib/computed';
import { longDate } from 'discourse/lib/formatter'; import { longDate } from 'discourse/lib/formatter';
import computed from 'ember-addons/ember-computed-decorators';
const Topic = RestModel.extend({ const Topic = RestModel.extend({
message: null, message: null,
errorLoading: false, errorLoading: false,
fancyTitle: function() { @computed('fancy_title')
return Discourse.Emoji.unescape(this.get('fancy_title')); fancyTitle(title) {
}.property("fancy_title"), title = Discourse.Emoji.unescape(title);
return Discourse.CensoredWords.censor(title);
},
// returns createdAt if there's no bumped date // returns createdAt if there's no bumped date
bumpedAt: function() { bumpedAt: function() {