Added in an even better regex.

This commit is contained in:
Josh Pruim 2012-12-01 22:29:48 -08:00
parent 604b785dde
commit 6c3bcb33c0
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")); callback(new customError("createPad can't create group pads","apierror"));
return; return;
} }
padID = padID.replace(/[;\/\?:@&=\+\$,{}\\\^\[\]\`\|]/gi, '_'); padID = padID.replace(/[;\/\?:@&=\+\$,{}\\\^\[\]\`\|%<>\*#]/gi, '_');
//create pad //create pad
getPadSafe(padID, false, text, function(err) getPadSafe(padID, false, text, function(err)
{ {

View file

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