Escape topic titles at the source, deduplicate

This commit is contained in:
Peter Jaszkowiak
2017-04-15 01:38:42 -06:00
parent ecfca21abe
commit 0fe10f5e86
10 changed files with 59 additions and 25 deletions

View File

@@ -161,9 +161,6 @@ categoryController.get = function (req, res, callback) {
return callback(err);
}
categoryData.topics.forEach(function (topic) {
topic.title = translator.escape(topic.title);
});
categoryData.description = translator.escape(categoryData.description);
categoryData.privileges = userPrivileges;
categoryData.showSelect = categoryData.privileges.editable;