added method to check for illegal characters in question text