mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
Merge pull request #833 from MarkTraceur/develop
Don't rewrite in a stupid way
This commit is contained in:
commit
35c24c1191
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue