SECURITY: sanitize topic title when staff is viewing a user's past flagged posts and deleted topics

This commit is contained in:
Neil Lalonde 2018-03-02 11:58:03 -05:00
parent 6a78669ca3
commit 5833d00739

View File

@ -1,3 +1,5 @@
import { emojiUnescape } from 'discourse/lib/text';
export default function (filter) { export default function (filter) {
return Discourse.Route.extend({ return Discourse.Route.extend({
actions: { actions: {
@ -20,6 +22,12 @@ export default function (filter) {
// initialize "canLoadMore" // initialize "canLoadMore"
model.set("canLoadMore", model.get("itemsLoaded") === 60); model.set("canLoadMore", model.get("itemsLoaded") === 60);
model.get('content').forEach((item) => {
if (item.get('title')) {
item.set('title', emojiUnescape(Handlebars.Utils.escapeExpression(item.title)));
}
});
this.controllerFor("user-posts").set("model", model); this.controllerFor("user-posts").set("model", model);
}, },