Added in better regex.

This commit is contained in:
Josh Pruim 2012-12-01 22:25:54 -08:00
parent 3d085f168a
commit 604b785dde
2 changed files with 2 additions and 2 deletions

View file

@ -331,7 +331,7 @@ exports.createPad = function(padID, text, callback)
callback(new customError("createPad can't create group pads","apierror"));
return;
}
padID = padID.replace(/[^a-z0-9_\-]/gi, '_');
padID = padID.replace(/[;\/\?:@&=\+\$,{}\\\^\[\]\`\|]/gi, '_');
//create pad
getPadSafe(padID, false, text, function(err)
{

View file

@ -171,7 +171,7 @@
function go2Name()
{
var padname = document.getElementById("padname").value.replace(/[^a-z0-9_\-]/gi, '_');
var padname = document.getElementById("padname").value.replace(/[;\/\?:@&=\+\$,{}\\\^\[\]\`\|]/gi, '_');
padname.length > 0 ? window.location = "p/" + padname : alert("Please enter a name");
}