From 6c3bcb33c0153a2ad35dcc10be6412847ee43c18 Mon Sep 17 00:00:00 2001 From: Josh Pruim Date: Sat, 1 Dec 2012 22:29:48 -0800 Subject: [PATCH] Added in an even better regex. --- src/node/db/API.js | 2 +- src/templates/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/db/API.js b/src/node/db/API.js index 900ca8025..cd0835b4f 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -331,7 +331,7 @@ exports.createPad = function(padID, text, callback) callback(new customError("createPad can't create group pads","apierror")); return; } - padID = padID.replace(/[;\/\?:@&=\+\$,{}\\\^\[\]\`\|]/gi, '_'); + padID = padID.replace(/[;\/\?:@&=\+\$,{}\\\^\[\]\`\|%<>\*#]/gi, '_'); //create pad getPadSafe(padID, false, text, function(err) { diff --git a/src/templates/index.html b/src/templates/index.html index 62a590a87..950c28b64 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -171,7 +171,7 @@ 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"); }