From c3063778ce389b7b186a4683faaed5635163a8d7 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 21 Nov 2013 16:13:05 +0100 Subject: [PATCH] [FIX] email.template: add safe filter over email address to allow emails to be sent in the format 'Name ' and avoid escaping bzr revid: mat@openerp.com-20131121151305-t5je12s4w5uctu0k --- addons/account/edi/invoice_action_data.xml | 2 +- .../account_analytic_analysis_cron.xml | 4 ++-- .../account_followup/account_followup_data.xml | 16 ++++++++-------- addons/auth_signup/auth_signup_data.xml | 8 ++++---- addons/event/email_template.xml | 8 ++++---- .../marketing_campaign_demo.xml | 6 +++--- addons/portal_sale/portal_sale_data.xml | 4 ++-- .../purchase/edi/purchase_order_action_data.xml | 2 +- addons/sale/edi/sale_order_action_data.xml | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/addons/account/edi/invoice_action_data.xml b/addons/account/edi/invoice_action_data.xml index 18ac71f55ce..4b62ef16faf 100644 --- a/addons/account/edi/invoice_action_data.xml +++ b/addons/account/edi/invoice_action_data.xml @@ -22,7 +22,7 @@ Invoice - Send by Email - ${object.user_id.email or object.company_id.email or 'noreply@localhost'} + ${object.user_id.email or object.company_id.email or 'noreply@localhost'|safe} ${object.company_id.name} Invoice (Ref ${object.number or 'n/a'}) ${object.partner_id.id} diff --git a/addons/account_analytic_analysis/account_analytic_analysis_cron.xml b/addons/account_analytic_analysis/account_analytic_analysis_cron.xml index 4a9cf457c3f..c8368bc51f7 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_cron.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_cron.xml @@ -4,9 +4,9 @@ Contract expiration reminder - ${object.email or ''} + ${object.email or ''|safe} Contract expiration reminder ${user.company_id.name} - ${object.email} + ${object.email|safe} ${object.lang} diff --git a/addons/account_followup/account_followup_data.xml b/addons/account_followup/account_followup_data.xml index 1a11db5e5f7..7dfc5dc0851 100644 --- a/addons/account_followup/account_followup_data.xml +++ b/addons/account_followup/account_followup_data.xml @@ -6,9 +6,9 @@ First polite payment follow-up reminder email - ${user.email or ''} + ${user.email or ''|safe} ${user.company_id.name} Payment Reminder - ${object.email} + ${object.email|safe} ${object.lang} @@ -45,9 +45,9 @@ ${object.get_followup_table_html() | safe} A bit urging second payment follow-up reminder email - ${user.email or ''} + ${user.email or ''|safe} ${user.company_id.name} Payment Reminder - ${object.email} + ${object.email|safe} ${object.lang} @@ -85,9 +85,9 @@ ${object.get_followup_table_html() | safe} Urging payment follow-up reminder email - ${user.email or ''} + ${user.email or ''|safe} ${user.company_id.name} Payment Reminder - ${object.email} + ${object.email|safe} ${object.lang} @@ -122,9 +122,9 @@ ${object.get_followup_table_html() | safe} Default payment follow-up reminder e-mail - ${user.email or ''} + ${user.email or ''|safe} ${user.company_id.name} Payment Reminder - ${object.email} + ${object.email|safe} ${object.lang} diff --git a/addons/auth_signup/auth_signup_data.xml b/addons/auth_signup/auth_signup_data.xml index 1b4e3e05502..dc34e4d8117 100644 --- a/addons/auth_signup/auth_signup_data.xml +++ b/addons/auth_signup/auth_signup_data.xml @@ -22,8 +22,8 @@ Reset Password - ]]> - ${object.email} + ]]> + ${object.email|safe} Password reset A password reset was requested for the OpenERP account linked to this email.

@@ -37,8 +37,8 @@ OpenERP Enterprise Connection - ]]> - ${object.email} + ]]> + ${object.email|safe} Confirmation of the Event - ${object.user_id.email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'} - ${object.email} + ${object.user_id.email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'|safe} + ${object.email|safe} Your registration at ${object.event_id.name} Hello ${object.name},

@@ -21,8 +21,8 @@ Confirmation of the Registration - ${object.user_id.email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'} - ${object.email} + ${object.user_id.email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'|safe} + ${object.email|safe} Your registration at ${object.event_id.name} Hello ${object.name},

diff --git a/addons/marketing_campaign/marketing_campaign_demo.xml b/addons/marketing_campaign/marketing_campaign_demo.xml index 92443fe987d..9b246286a5f 100644 --- a/addons/marketing_campaign/marketing_campaign_demo.xml +++ b/addons/marketing_campaign/marketing_campaign_demo.xml @@ -6,7 +6,7 @@ welcome new partner info@openerp.com Welcome to the OpenERP Partner Channel! - ${object.email or ''} + ${object.email or ''|safe} Hello, you will receive your welcome pack via email shortly.
@@ -14,7 +14,7 @@ congrats silver partner info@openerp.com Congratulations! You are now a Silver Partner! - ${object.email or ''} + ${object.email or ''|safe} Hi, we are delighted to welcome you among our Silver Partners as of today!
@@ -23,7 +23,7 @@ congrats gold partner info@openerp.com Congratulations! You are now one of our Gold Partners! - ${object.email or ''} + ${object.email or ''|safe} Hi, we are delighted to let you know that you have entered the select circle of our Gold Partners
diff --git a/addons/portal_sale/portal_sale_data.xml b/addons/portal_sale/portal_sale_data.xml index 31a2f19ef28..778f2d4f129 100644 --- a/addons/portal_sale/portal_sale_data.xml +++ b/addons/portal_sale/portal_sale_data.xml @@ -6,7 +6,7 @@ Sales Order - Send by Email (Portal) - ${object.user_id.email or ''} + ${object.user_id.email or ''|safe} ${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) ${object.partner_invoice_id.id} @@ -95,7 +95,7 @@ Invoice - Send by Email (Portal) - ${object.user_id.email or object.company_id.email or 'noreply@localhost'} + ${object.user_id.email or object.company_id.email or 'noreply@localhost'|safe} ${object.company_id.name} Invoice (Ref ${object.number or 'n/a' }) ${object.partner_id.id} diff --git a/addons/purchase/edi/purchase_order_action_data.xml b/addons/purchase/edi/purchase_order_action_data.xml index 3b02be574ef..19b4d14b2be 100644 --- a/addons/purchase/edi/purchase_order_action_data.xml +++ b/addons/purchase/edi/purchase_order_action_data.xml @@ -19,7 +19,7 @@ Purchase Order - Send by mail - ${object.validator.email or ''} + ${object.validator.email or ''|safe} ${object.company_id.name} Order (Ref ${object.name or 'n/a' }) ${object.partner_id.id} diff --git a/addons/sale/edi/sale_order_action_data.xml b/addons/sale/edi/sale_order_action_data.xml index 16712532285..fe289559584 100644 --- a/addons/sale/edi/sale_order_action_data.xml +++ b/addons/sale/edi/sale_order_action_data.xml @@ -20,7 +20,7 @@ Sales Order - Send by Email - ${object.user_id.email or ''} + ${object.user_id.email or ''|safe} ${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) ${object.partner_invoice_id.id}