Skip to content

Node.js based forum software built for the modern web

encodeURI redirect url

Barış Soner Uşaklıb807d3750c89
diff --git a/src/controllers/helpers.js b/src/controllers/helpers.js
index 8db1d6266f..732652aa38 100644
--- a/src/controllers/helpers.js
+++ b/src/controllers/helpers.js
@@ -53,7 +53,7 @@ helpers.notAllowed = function (req, res, error) {
helpers.redirect = function (res, url) {
if (res.locals.isAPI) {
- res.set('X-Redirect', url).status(200).json(url);
+ res.set('X-Redirect', encodeURI(url)).status(200).json(url);
} else {
res.redirect(nconf.get('relative_path') + encodeURI(url));
}