@social-mail/social-mail-client 1.9.110 → 1.9.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css-for-email.js +3 -4
- package/package.json +1 -1
package/css-for-email.js
CHANGED
|
@@ -23,10 +23,9 @@ async function flattenStyleSheets() {
|
|
|
23
23
|
|
|
24
24
|
const te = new TextEncoder();
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
function encodeTo36(text) {
|
|
27
27
|
const buffer = te.encode(text);
|
|
28
|
-
const
|
|
29
|
-
const c = window.btoa(hash);
|
|
28
|
+
const c = window.btoa(buffer);
|
|
30
29
|
return "c_" + c.replaceAll("=", "_");
|
|
31
30
|
}
|
|
32
31
|
|
|
@@ -47,7 +46,7 @@ async function flattenStyler() {
|
|
|
47
46
|
const value = e.getAttribute(name);
|
|
48
47
|
const cssValue = CSS.escape(value);
|
|
49
48
|
const rule = `[${name}=${cssValue}]`;
|
|
50
|
-
const className =
|
|
49
|
+
const className = encodeTo36(rule);
|
|
51
50
|
e.classList.add(className);
|
|
52
51
|
replaceList.push({ rule, className: "." + className});
|
|
53
52
|
remove.push(name);
|