allow using only text content
This commit is contained in:
parent
3afb37e169
commit
59c7e1dd8b
3 changed files with 38 additions and 22 deletions
|
@ -631,13 +631,14 @@ module.exports.create = (campaign, opts, callback) => {
|
|||
tools.prepareHtml(campaign.html, (err, preparedHtml) => {
|
||||
if (err) {
|
||||
log.error('jsdom', err);
|
||||
}
|
||||
|
||||
if (!preparedHtml) {
|
||||
preparedHtml = campaign.html;
|
||||
}
|
||||
|
||||
if (preparedHtml) {
|
||||
keys.push('html_prepared');
|
||||
values.push(preparedHtml);
|
||||
}
|
||||
keys.push('html_prepared');
|
||||
values.push(preparedHtml);
|
||||
|
||||
db.getConnection((err, connection) => {
|
||||
if (err) {
|
||||
|
@ -796,13 +797,14 @@ module.exports.update = (id, updates, callback) => {
|
|||
tools.prepareHtml(campaign.html, (err, preparedHtml) => {
|
||||
if (err) {
|
||||
log.error('jsdom', err);
|
||||
}
|
||||
|
||||
if (!preparedHtml) {
|
||||
preparedHtml = campaign.html;
|
||||
}
|
||||
|
||||
if (preparedHtml) {
|
||||
keys.push('html_prepared');
|
||||
values.push(preparedHtml);
|
||||
}
|
||||
keys.push('html_prepared');
|
||||
values.push(preparedHtml);
|
||||
|
||||
db.getConnection((err, connection) => {
|
||||
if (err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue