[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
This commit is contained in:
Nicolas Lempereur
2015-06-30 12:21:07 +02:00
parent 55881d3ec3
commit 6316bce8fe
@@ -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<st.length; k++) {
rulesCache.push({