mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 04:31:56 +08:00
SECURITY: sanitize topic title when staff is viewing a user's past flagged posts and deleted topics
This commit is contained in:
parent
6a78669ca3
commit
5833d00739
|
@ -1,3 +1,5 @@
|
|||
import { emojiUnescape } from 'discourse/lib/text';
|
||||
|
||||
export default function (filter) {
|
||||
return Discourse.Route.extend({
|
||||
actions: {
|
||||
|
@ -20,6 +22,12 @@ export default function (filter) {
|
|||
// initialize "canLoadMore"
|
||||
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);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user