Added Sanitization logic for custom PadIDs

This commit is contained in:
Josh Pruim 2012-12-01 20:18:21 -08:00
parent 2d91d8e185
commit 8204b52f55

View file

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