Node.js based forum software built for the modern web
fix: #8929, fix popular, top rss feed urls
Barış Soner Uşaklı77f0bff54ff8
diff --git a/src/controllers/popular.js b/src/controllers/popular.jsindex 371eb5f42d..29f62c80ab 100644--- a/src/controllers/popular.js+++ b/src/controllers/popular.js@@ -22,7 +22,7 @@ popularController.get = async function (req, res, next) {}const feedQs = data.rssFeedUrl.split('?')[1];- data.rssFeedUrl = nconf.get('relative_path') + '/popular/' + (validator.escape(String(req.query.term)) || 'alltime') + '.rss';+ data.rssFeedUrl = nconf.get('relative_path') + '/popular/' + validator.escape(String(req.query.term || 'alltime')) + '.rss';if (req.loggedIn) {data.rssFeedUrl += '?' + feedQs;}diff --git a/src/controllers/top.js b/src/controllers/top.jsindex 4a482baaf5..40fd8b869c 100644--- a/src/controllers/top.js+++ b/src/controllers/top.js@@ -20,7 +20,7 @@ topController.get = async function (req, res, next) {}const feedQs = data.rssFeedUrl.split('?')[1];- data.rssFeedUrl = nconf.get('relative_path') + '/top/' + (validator.escape(String(req.query.term)) || 'alltime') + '.rss';+ data.rssFeedUrl = nconf.get('relative_path') + '/top/' + validator.escape(String(req.query.term || 'alltime')) + '.rss';if (req.loggedIn) {data.rssFeedUrl += '?' + feedQs;}