Some fixes so that the subscription forms work with the new mailer

This commit is contained in:
Tomas Bures 2018-05-20 20:27:35 +02:00
parent 446d75ce71
commit 1f5566ca9b
5 changed files with 22 additions and 9 deletions

View file

@ -67,7 +67,7 @@ async function mergeTemplateIntoLayout(template, layout) {
}
if (template.endsWith('.hbs')) {
template = readFile(template);
template = await readFile(template);
}
const source = layout.replace(/\{\{\{body\}\}\}/g, template);
@ -121,7 +121,7 @@ async function prepareHtml(html) {
FetchExternalResources: false, // disables resource loading over HTTP / filesystem
ProcessExternalResources: false // do not execute JS within script blocks
}
})
});
const head = win.document.querySelector('head');
let hasCharsetTag = false;