mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
Escape topic titles at the source, deduplicate
This commit is contained in:
@@ -14,7 +14,6 @@ var plugins = require('../plugins');
|
||||
var helpers = require('./helpers');
|
||||
var pagination = require('../pagination');
|
||||
var utils = require('../utils');
|
||||
var translator = require('../translator');
|
||||
|
||||
var topicsController = {};
|
||||
|
||||
@@ -130,14 +129,13 @@ topicsController.get = function (req, res, callback) {
|
||||
plugins.fireHook('filter:controllers.topic.get', { topicData: topicData, uid: req.uid }, next);
|
||||
},
|
||||
function (data, next) {
|
||||
data.topicData.title = translator.escape(data.topicData.title);
|
||||
var breadcrumbs = [
|
||||
{
|
||||
text: data.topicData.category.name,
|
||||
url: nconf.get('relative_path') + '/category/' + data.topicData.category.slug,
|
||||
},
|
||||
{
|
||||
text: translator.escape(data.topicData.title),
|
||||
text: data.topicData.title,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user