Merge pull request #289 from jhollinger/no_spaces

Sanitize pad names
This commit is contained in:
John McLear 2012-01-08 07:30:07 -08:00
commit 642b716553
5 changed files with 145 additions and 70 deletions

View file

@ -194,7 +194,7 @@ function handshake()
padId = decodeURIComponent(padId); // unescape neccesary due to Safari and Opera interpretation of spaces
if(!isReconnect)
document.title = document.title + " | " + padId;
document.title = document.title + " | " + padId.replace(/_+/g, ' ');
var token = readCookie("token");
if (token == null)

View file

@ -65,7 +65,7 @@
padId = decodeURIComponent(urlParts[urlParts.length-2]);
//set the title
document.title = document.title + " | " + padId;
document.title = document.title + " | " + padId.replace(/_+/g, ' ');
//ensure we have a token
token = readCookie("token");