* Fix #5592
Escape translation tokens in topic titles, descriptions, profile about, and post contents

* Fix tests
This commit is contained in:
Peter Jaszkowiak
2017-04-13 12:37:54 -06:00
committed by psychobunny
parent c3febca9c8
commit 1fb48ef7a7
9 changed files with 31 additions and 18 deletions

View File

@@ -11,7 +11,7 @@ var posts = require('../posts');
var topics = require('../topics');
var privileges = require('../privileges');
var batch = require('../batch');
var translator = require('../translator');
module.exports = function (Categories) {
Categories.getRecentReplies = function (cid, uid, count, callback) {
@@ -136,7 +136,7 @@ module.exports = function (Categories) {
teaser.user.uid = undefined;
teaser.topic = {
slug: topicData[index].slug,
title: validator.escape(String(topicData[index].title)),
title: translator.escape(validator.escape(String(topicData[index].title))),
};
}
});