Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# not released

- detect-character-encoding is not working on Alpine Linux
so was replaced with ced

# 1.8.1 - 2021-03-26

- Changed the body utility to convert buffer to string (seems to fix an issue some users reported)
Expand Down
6 changes: 3 additions & 3 deletions email_body_utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const EmailBodyUtility = function() {
const linkify = require('linkify-it')();
// const ced = require('ced');
const Splitter = require('mailsplit').Splitter;
const detectCharacterEncoding = require('detect-character-encoding');
const detectCharacterEncoding = require('ced');

const quotedPrintable = require('quoted-printable');

Expand Down Expand Up @@ -465,7 +465,7 @@ const EmailBodyUtility = function() {
body = body.replace(_iso_8859_charset_regex, 'text/html;');
}

// Windows-1252 or 1257 can appear in the html when the charset is ISO-8859-1
// Windows-1252 or 1257 can appear in the html when the charset is ISO-8859-1
if (_windows_charset_regex.test(body)) {
_log_module && console.log(`replacing Windows-1252 or -1257 charset directives, which are present in the html`);
body = body.replace(_windows_charset_regex, 'text/html;');
Expand Down Expand Up @@ -654,4 +654,4 @@ const EmailBodyUtility = function() {
convertPlainTextToHtml // (text)
};
}();
module.exports = EmailBodyUtility;
module.exports = EmailBodyUtility;
59 changes: 24 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"homepage": "https://github.com/haraka/haraka-plugin-mongodb#readme",
"dependencies": {
"async": "^3.2.0",
"ced": "^1.0.0",
"decode-html": "^2",
"detect-character-encoding": "^0.8.0",
"fs-extra": "^9",
"iconv": "^3",
"ioredis": "^4.24.4",
Expand Down