Sanitizing inputs

Never trust any input from the user.  Rather than creating a list of characters to filter(blacklist), create a list of characters that are accepted(whitelist). This prevents any loopholes from creeping up later.