fix double-URL-encoding causing redirect loops

This commit is contained in:
Ben Lubar
2016-03-22 19:54:27 -05:00
parent 89aa06526d
commit c7cfe45d0b
2 changed files with 2 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ topicsController.get = function(req, res, callback) {
}
if (!res.locals.isAPI && (!req.params.slug || results.topic.slug !== tid + '/' + req.params.slug) && (results.topic.slug && results.topic.slug !== tid + '/')) {
var url = '/topic/' + encodeURI(results.topic.slug);
var url = '/topic/' + results.topic.slug;
if (req.params.post_index){
url += '/'+req.params.post_index;
}