diff options
| author | qdp-odoo <qdp@odoo.com> | 2018-06-06 10:00:36 +0200 |
|---|---|---|
| committer | qdp-odoo <qdp@odoo.com> | 2018-06-06 14:17:03 +0200 |
| commit | a6b75d401dcbf9ff9eacacddd869ad68cdbb290d (patch) | |
| tree | 7c54236ddd21b19d367d5db6992f86fff9b3a2c7 /odoo/tools | |
| parent | f81963addd81d1476d091aaaa06c2e0c34e29f6d (diff) | |
[REF] mail_thread: refactoring of _find_partner_from_emails()
More flexibility equals more powa
Diffstat (limited to 'odoo/tools')
| -rw-r--r-- | odoo/tools/mail.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/odoo/tools/mail.py b/odoo/tools/mail.py index d3291e648fb..3981f4b62cd 100644 --- a/odoo/tools/mail.py +++ b/odoo/tools/mail.py @@ -501,6 +501,10 @@ def email_split_and_format(text): if addr[1] if '@' in addr[1]] +def email_escape_char(email_address): + """ Escape problematic characters in the given email address string""" + return email_address.replace('\\', '\\\\').replace('%', '\\%').replace('_', '\\_') + def email_references(references): ref_match, model, thread_id, hostname, is_private = False, False, False, False, False if references: |
