From 6316bce8fea83aab822d04f20b0d5f8b41608014 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Tue, 30 Jun 2015 10:12:42 +0200 Subject: [PATCH] [FIX] website_mail: special case for css splitting The css of a mail is inlined as best as possible for the mail sending. Previously, if there was a selector like .ch[onclick="ga(this,event)"] the simple splitting would split in the middle and get one erroneous selector (which then would trigger an error). With his commit, rules containing " or ' are ignored. opw-643548 --- addons/website_mail/static/src/js/website_email_designer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/website_mail/static/src/js/website_email_designer.js b/addons/website_mail/static/src/js/website_email_designer.js index b2ce7286281..4bc778c2130 100644 --- a/addons/website_mail/static/src/js/website_email_designer.js +++ b/addons/website_mail/static/src/js/website_email_designer.js @@ -240,7 +240,9 @@ selectorText.indexOf(":after") === -1 && selectorText.indexOf(":active") === -1 && selectorText.indexOf(":link") === -1 && - selectorText.indexOf("::") === -1) { + selectorText.indexOf("::") === -1 && + selectorText.indexOf("\"") === -1 && + selectorText.indexOf("'") === -1) { var st = selectorText.split(/\s*,\s*/); for (var k=0; k