Oh, and move the INVALID_CHARS definition below the comment.