This commit is contained in:
Stefan 'Gared 2012-02-26 19:52:09 +00:00
commit 6706332e42
25 changed files with 1433 additions and 778 deletions

View file

@ -43,7 +43,8 @@ var globalPads = {
* time, and allow us to "play back" these changes so legacy padIds can be found.
*/
var padIdTransforms = [
[/\s+/g, '_']
[/\s+/g, '_'],
[/:+/g, '_']
];
/**

View file

@ -98,7 +98,7 @@ async.waterfall([
//the pad id was sanitized, so we redirect to the sanitized version
if(sanitizedPadId != padId)
{
var real_path = req.path.replace(/^\/p\/[^\/]+/, '/p/' + sanitizedPadId);
var real_path = req.path.replace(/^\/p\/[^\/]+/, './' + sanitizedPadId);
res.header('Location', real_path);
res.send('You should be redirected to <a href="' + real_path + '">' + real_path + '</a>', 302);
}