mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
fixes #5263
This commit is contained in:
@@ -111,6 +111,7 @@ module.exports = function (middleware) {
|
|||||||
var clean = req.path.replace(/^\/api/, '').replace(/^\/|\/$/g, '');
|
var clean = req.path.replace(/^\/api/, '').replace(/^\/|\/$/g, '');
|
||||||
var parts = clean.split('/').slice(0, 3);
|
var parts = clean.split('/').slice(0, 3);
|
||||||
parts.forEach(function (p, index) {
|
parts.forEach(function (p, index) {
|
||||||
|
p = decodeURIComponent(p);
|
||||||
parts[index] = index ? parts[0] + '-' + p : 'page-' + (p || 'home');
|
parts[index] = index ? parts[0] + '-' + p : 'page-' + (p || 'home');
|
||||||
});
|
});
|
||||||
return parts.join(' ');
|
return parts.join(' ');
|
||||||
|
|||||||
Reference in New Issue
Block a user