Skip to content

Remove exactly one closing angle bracket after a display name - #176

Merged
JoshData merged 1 commit into
JoshData:mainfrom
youdie006:display-name-one-bracket
Oct 1, 2026
Merged

JoshData merged 1 commit into
JoshData:mainfrom
youdie006:display-name-one-bracket

Conversation

@youdie006

Copy link
Copy Markdown
Contributor

With allow_display_name=True, Me <[email protected]>> validates as [email protected]. split_email removes the closing bracket with .rstrip(">"), which strips any number of them, while Me <[email protected]> > is already rejected. The check just above makes sure the part ends with >, so this slices off exactly one.

Inputs with an extra > now fail with the existing "invalid characters: '>'" error. In a sweep comparing before and after over 1,192 inputs, only those ending in >> changed.

Written with AI assistance (Claude); I have reviewed the change.

rstrip('>') removed any number of them, so 'Me <[email protected]>>' was
accepted.
@JoshData
JoshData merged commit dcc3218 into JoshData:main Oct 1, 2026
5 checks passed
@JoshData

JoshData commented Oct 1, 2026

Copy link
Copy Markdown
Owner

TY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants