summaryrefslogtreecommitdiff
path: root/src/node/hooks/express/padurlsanitize.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/hooks/express/padurlsanitize.js')
-rw-r--r--src/node/hooks/express/padurlsanitize.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node/hooks/express/padurlsanitize.js b/src/node/hooks/express/padurlsanitize.js
index 229d013d..24ec2c3d 100644
--- a/src/node/hooks/express/padurlsanitize.js
+++ b/src/node/hooks/express/padurlsanitize.js
@@ -15,7 +15,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
//the pad id was sanitized, so we redirect to the sanitized version
if(sanitizedPadId != padId)
{
- var real_url = req.url.replace(/^\/p\/[^\/]+/, '/p/' + sanitizedPadId);
+ var real_url = sanitizedPadId;
var query = url.parse(req.url).query;
if ( query ) real_url += '?' + query;
res.header('Location', real_url);