Merge pull request #833 from MarkTraceur/develop

Don't rewrite in a stupid way
pull/835/head^2
John McLear 2012-07-03 01:53:19 -07:00
commit 35c24c1191
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
//the pad id was sanitized, so we redirect to the sanitized version //the pad id was sanitized, so we redirect to the sanitized version
if(sanitizedPadId != padId) if(sanitizedPadId != padId)
{ {
var real_url = req.url.replace(/^\/p\/[^\/]+/, '/p/' + sanitizedPadId); var real_url = sanitizedPadId;
var query = url.parse(req.url).query; var query = url.parse(req.url).query;
if ( query ) real_url += '?' + query; if ( query ) real_url += '?' + query;
res.header('Location', real_url); res.header('Location', real_url);