From 2ce6a8575656182c79b1ca5a0e432891a97a2df3 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 13 Aug 2018 14:17:51 -0400 Subject: [PATCH] properly closes #6698 --- src/flags.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/flags.js b/src/flags.js index 0f056fa295..a453dccf03 100644 --- a/src/flags.js +++ b/src/flags.js @@ -99,10 +99,7 @@ Flags.get = function (flagId, callback) { target_readable: data.base.type.charAt(0).toUpperCase() + data.base.type.slice(1) + ' ' + data.base.targetId, target: payload.targetObj, history: data.history, - notes: data.notes.map((note) => { - note.content = validator.escape(note.content); - return note; - }), + notes: data.notes, reporter: payload.userObj, })); }); @@ -323,6 +320,7 @@ Flags.getNotes = function (flagId, callback) { next(null, notes.map(function (note, idx) { note.user = users[idx]; + note.content = validator.escape(note.content); return note; })); });