@social-mail/social-mail-web-server 1.7.475 → 1.7.476

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.7.475",
3
+ "version": "1.7.476",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -106,6 +106,16 @@ export default class PreviewDraftService extends ServiceObject implements ICache
106
106
 
107
107
  body = `<!DOCTYPE HTML>${document.documentElement.outerHTML}`;
108
108
  } else {
109
+ for(const node of descendentElementIterator(document.documentElement)) {
110
+ switch(node.tagName) {
111
+ case "SCRIPT":
112
+ await this.rewriteLink(node, "src");
113
+ continue;
114
+ case "LINK":
115
+ await this.rewriteLink(node, "href");
116
+ continue;
117
+ }
118
+ }
109
119
  body = body.split(/\<\/head\>/i).join(`<base href="/api/site/draft/${siteID}/"/></head>`);
110
120
  }
111
121