@social-mail/social-mail-web-server 1.8.375 → 1.8.377

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.8.375",
3
+ "version": "1.8.377",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -17,7 +17,7 @@ export default async function seedUI(config: DBConfig) {
17
17
  await config.saveVersion(UIPackageConfig, {
18
18
  package: "@social-mail/social-mail-client",
19
19
  view: "dist/web/AppIndex",
20
- version: "1.9.71"
20
+ version: "1.9.73"
21
21
  });
22
22
 
23
23
  await config.saveVersion(WebComponentsPackageConfig, {
@@ -75,6 +75,7 @@ export default class BlogContentTransformer {
75
75
  }
76
76
 
77
77
  c.replaceSrc(prefix);
78
+ c.replaceSrc(prefix, "srcset");
78
79
  c.replaceBackground(prefix);
79
80
 
80
81
  if (element.getAttribute("data-stream-enabled")) {
@@ -110,6 +110,7 @@ export default class HtmlSanitizer {
110
110
  case 1:
111
111
  const e = node as HTMLElement;
112
112
  this.replaceSrc(e, prefix);
113
+ this.replaceSrc(e, prefix);
113
114
  this.replaceBackground(e, prefix);
114
115
  continue;
115
116
  case 3:
@@ -106,17 +106,16 @@ export class TransformContext {
106
106
  }
107
107
 
108
108
 
109
- replaceSrc(prefix: any) {
109
+ replaceSrc(prefix: any, attributeName = "src") {
110
110
  const e = this.node as HTMLElement;
111
111
  if (!/img|picture|video|source|svg|image\-slices/i.test(e.tagName)) {
112
112
  return;
113
113
  }
114
- const attributeName = "src";
115
114
  let src = e.getAttribute(attributeName);
116
115
  if (!src || src.startsWith("cid:")) {
117
116
  return;
118
117
  }
119
- src = src.replace(/https?\:\/\//, prefix);
118
+ src = src.replace(/https?\:\/\//g, prefix);
120
119
  e.setAttribute(attributeName, src);
121
120
  }
122
121
 
@@ -95,7 +95,7 @@ export default class CachedEmailService {
95
95
  };
96
96
 
97
97
  const ef = await this.cacheService.get({
98
- key: `cached-email-html-b16-${emailID}-${senderDomain}-${status}`,
98
+ key: `cached-email-html-b17-${emailID}-${senderDomain}-${status}`,
99
99
  factory,
100
100
  ttl: TimeSpan.fromDays(30)
101
101
  });