fix: #8929, fix popular, top rss feed urls

v1.18.x
Barış Soner Uşaklı 4 years ago
parent 8f4060819f
commit 77f0bff54f

@ -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;
}

@ -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;
}

Loading…
Cancel
Save