added handling for duplicate characters in the disallowed characters section