mailery 0.13.0 → 0.14.0

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/dist/index.js CHANGED
@@ -1933,6 +1933,7 @@ function derivePlaintext(html) {
1933
1933
  ]
1934
1934
  }).trim();
1935
1935
  }
1936
+ var PLAIN_TEXT = { noEscape: true };
1936
1937
  async function renderTemplate(template, ctx, opts = {}) {
1937
1938
  const hb = makeHandlebars(opts.helpers);
1938
1939
  const subject = hb.compile(template.subject)(ctx);
@@ -1944,7 +1945,7 @@ async function renderTemplate(template, ctx, opts = {}) {
1944
1945
  const compiled = await compileTemplate(template.body.mjml);
1945
1946
  html = hb.compile(compiled.html)(ctx);
1946
1947
  }
1947
- const plainText = template.body.plainText ? hb.compile(template.body.plainText)(ctx) : derivePlaintext(html);
1948
+ const plainText = template.body.plainText ? hb.compile(template.body.plainText, PLAIN_TEXT)(ctx) : derivePlaintext(html);
1948
1949
  return {
1949
1950
  subject,
1950
1951
  preheader,
@@ -7762,7 +7763,7 @@ var DEDUPE_POLICIES = [
7762
7763
  ];
7763
7764
 
7764
7765
  // src/server/index.ts
7765
- var VERSION = "0.13.0" ;
7766
+ var VERSION = "0.14.0" ;
7766
7767
 
7767
7768
  export { DEDUPE_POLICIES, FLOW_STEP_KINDS, Mailer, MongoContactAdapter, NullProvider, PREDICATE_KINDS, RESERVED_VAR_KEYS, SEGMENT_FILTER_KINDS, SendGridProvider, VERSION, applyTracking, applyWebhookEvent, compileMailyTemplate, compileTemplate, computeDeliveryTime, createAdminRouter, createPublicRouter, defaultFlowStep, defaultPredicate, defaultSegmentFilter, defineVars, derivePlaintext, dispatchSend, ensureIndexes, getCollections, predicateKind, processNewlyFiredEventTriggers, processOneRunStep, renderTemplate, runTick, sha256Hex, signUnsubscribeToken, sweepStrandedFlowRuns, validateSenderDomain, varsJsonSchema, verifyUnsubscribeToken };
7768
7769
  //# sourceMappingURL=index.js.map