@social-mail/social-mail-client 1.9.110 → 1.9.112
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 -5
- package/package.json +1 -1
package/css-for-email.js
CHANGED
|
@@ -23,10 +23,8 @@ async function flattenStyleSheets() {
|
|
|
23
23
|
|
|
24
24
|
const te = new TextEncoder();
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
const hash = await window.crypto.subtle.digest("SHA-1", buffer);
|
|
29
|
-
const c = window.btoa(hash);
|
|
26
|
+
function encodeTo36(text) {
|
|
27
|
+
const c = window.btoa(text);
|
|
30
28
|
return "c_" + c.replaceAll("=", "_");
|
|
31
29
|
}
|
|
32
30
|
|
|
@@ -47,7 +45,7 @@ async function flattenStyler() {
|
|
|
47
45
|
const value = e.getAttribute(name);
|
|
48
46
|
const cssValue = CSS.escape(value);
|
|
49
47
|
const rule = `[${name}=${cssValue}]`;
|
|
50
|
-
const className =
|
|
48
|
+
const className = encodeTo36(rule);
|
|
51
49
|
e.classList.add(className);
|
|
52
50
|
replaceList.push({ rule, className: "." + className});
|
|
53
51
|
remove.push(name);
|