mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: update html-to-text closes https://github.com/NodeBB/NodeBB/pull/8810
This commit is contained in:
@@ -69,7 +69,7 @@
|
|||||||
"express-useragent": "^1.0.13",
|
"express-useragent": "^1.0.13",
|
||||||
"graceful-fs": "^4.2.3",
|
"graceful-fs": "^4.2.3",
|
||||||
"helmet": "^4.0.0",
|
"helmet": "^4.0.0",
|
||||||
"html-to-text": "^5.1.1",
|
"html-to-text": "6.0.0",
|
||||||
"ipaddr.js": "^2.0.0",
|
"ipaddr.js": "^2.0.0",
|
||||||
"jquery": "3.5.1",
|
"jquery": "3.5.1",
|
||||||
"jquery-deserialize": "2.0.0-rc1",
|
"jquery-deserialize": "2.0.0-rc1",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const nconf = require('nconf');
|
|||||||
const Benchpress = require('benchpressjs');
|
const Benchpress = require('benchpressjs');
|
||||||
const nodemailer = require('nodemailer');
|
const nodemailer = require('nodemailer');
|
||||||
const wellKnownServices = require('nodemailer/lib/well-known/services');
|
const wellKnownServices = require('nodemailer/lib/well-known/services');
|
||||||
const htmlToText = require('html-to-text');
|
const { htmlToText } = require('html-to-text');
|
||||||
const url = require('url');
|
const url = require('url');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
@@ -287,8 +287,8 @@ Emailer.sendToEmail = async (template, email, language, params) => {
|
|||||||
from_name: meta.config['email:from_name'] || 'NodeBB',
|
from_name: meta.config['email:from_name'] || 'NodeBB',
|
||||||
subject: '[' + meta.config.title + '] ' + _.unescape(subject),
|
subject: '[' + meta.config.title + '] ' + _.unescape(subject),
|
||||||
html: html,
|
html: html,
|
||||||
plaintext: htmlToText.fromString(html, {
|
plaintext: htmlToText(html, {
|
||||||
ignoreImage: true,
|
tags: { img: { format: 'skip' } },
|
||||||
}),
|
}),
|
||||||
template: template,
|
template: template,
|
||||||
uid: params.uid,
|
uid: params.uid,
|
||||||
|
|||||||
Reference in New Issue
Block a user