Added check for valid slug characters.