Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: parsing of (text encoded) addresses #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

romanofski
Copy link
Member

@romanofski romanofski commented Jan 6, 2025

This addresses the parsing issue of email addresses (specifically the display names) when using text parser. It mainly allows all non-ASCII letters, but sticks with the character classes of atext.

Fixes: #87

This adds an additional exported symbol addressSpec as it is used to fix purebred-mua/purebred#515

src/Data/IMF/Text.hs Outdated Show resolved Hide resolved
@@ -99,14 +100,20 @@ mailbox = Mailbox <$> optional displayName <*> angleAddr
readMailbox :: String -> Either String Mailbox
readMailbox = parseOnly (mailbox <* endOfInput) . T.pack

quotedString :: Parser T.Text
quotedString = optionalFWS *> dquote *> phrase <* dquote
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just realised that this misses the specials... like e.g."Mr. Doyle" <...>

@romanofski romanofski force-pushed the fix/text-address-parser branch from 6a60cae to 723bdbc Compare January 10, 2025 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants