fix two crashes

This commit is contained in:
Ben Lubar
2016-03-20 15:11:32 -05:00
parent e556ae93ea
commit 3c607f2612
2 changed files with 4 additions and 4 deletions

View File

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