mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
fix two crashes
This commit is contained in:
@@ -41,7 +41,7 @@ helpers.redirect = function(res, url) {
|
||||
if (res.locals.isAPI) {
|
||||
res.status(308).json(url);
|
||||
} else {
|
||||
res.redirect(nconf.get('relative_path') + url);
|
||||
res.redirect(nconf.get('relative_path') + encodeURI(url));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -109,4 +109,4 @@ helpers.buildTitle = function(pageTitle) {
|
||||
return title;
|
||||
};
|
||||
|
||||
module.exports = helpers;
|
||||
module.exports = helpers;
|
||||
|
||||
Reference in New Issue
Block a user