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 { propertyEqual } from 'discourse/lib/computed';
import { longDate } from 'discourse/lib/formatter';
import computed from 'ember-addons/ember-computed-decorators';
const Topic = RestModel.extend({
message: null,
errorLoading: false,
fancyTitle: function() {
return Discourse.Emoji.unescape(this.get('fancy_title'));
}.property("fancy_title"),
@computed('fancy_title')
fancyTitle(title) {
title = Discourse.Emoji.unescape(title);
return Discourse.CensoredWords.censor(title);
},
// returns createdAt if there's no bumped date
bumpedAt: function() {