escape topic title and category name

This commit is contained in:
Barış Soner Uşaklı
2014-12-11 03:09:09 -05:00
parent 3deb423c55
commit 5f47f2226a

View File

@@ -212,7 +212,7 @@ middleware.buildBreadcrumbs = function(req, res, next) {
}
breadcrumbs.unshift({
text: data.name,
text: validator.escape(data.name),
url: nconf.get('relative_path') + '/category/' + data.slug
});
@@ -242,7 +242,7 @@ middleware.buildBreadcrumbs = function(req, res, next) {
if (req.params.topic_id) {
topics.getTopicFields(parseInt(req.params.topic_id, 10), ['cid', 'title', 'slug'], function(err, data) {
breadcrumbs.unshift({
text: data.title,
text: validator.escape(data.title),
url: nconf.get('relative_path') + '/topic/' + data.slug
});