Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update qreu/address.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • Loading branch information
ecarreras and Copilot authored Jul 30, 2025
commit daabc9f613de0f55272caf3e8df8916af2638c1a
3 changes: 2 additions & 1 deletion qreu/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def normalize_display_address(addr_string):
name = name_part.strip()
email = addr_part.strip('> ').strip()

if name and not (name.startswith('"') and name.endswith('"')):
special_chars = {',', ';', '<', '>'}
if name and not (name.startswith('"') and name.endswith('"')) and any(char in name for char in special_chars):
name = name.replace('"', r'\"')
if any(c in name for c in [',', ';', ':']):
name = '"{}"'.format(name)
Expand Down