Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mailparser

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailparser - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

44

lib/mail-parser.js

@@ -26,8 +26,7 @@ 'use strict';

constructor(config) {
let options = {
super({
readableObjectMode: true,
writableObjectMode: false,
skipTextToHtml: false
};
super(options);
});

@@ -828,2 +827,6 @@ this.options = config || {};

if (this.options.skipImageLinks) {
return done(null, html);
}
html.replace(/\bcid:([^'"\s]{1,256})/g, (match, cid) => {

@@ -883,25 +886,28 @@ for (let i = 0, len = this.attachmentList.length; i < len; i++) {

try {
if (linkify.pretest(encoded)) {
let links = linkify.match(encoded) || [];
let result = [];
let last = 0;
if (!this.options.skipTextLinks) {
try {
if (linkify.pretest(encoded)) {
let links = linkify.match(encoded) || [];
let result = [];
let last = 0;
links.forEach(link => {
if (last < link.index) {
result.push(encoded.slice(last, link.index));
}
links.forEach(link => {
if (last < link.index) {
result.push(encoded.slice(last, link.index));
}
result.push(`<a href="${link.url}">${link.text}</a>`);
result.push(`<a href="${link.url}">${link.text}</a>`);
last = link.lastIndex;
});
last = link.lastIndex;
});
result.push(encoded.slice(last));
result.push(encoded.slice(last));
encoded = result.join('');
encoded = result.join('');
}
} catch (E) {
// failed, don't linkify
}
} catch (E) {
// failed, don't linkify
}
let text =

@@ -908,0 +914,0 @@ '<p>' +

@@ -25,3 +25,3 @@ 'use strict';

let parser = new MailParser();
let parser = new MailParser(options);

@@ -28,0 +28,0 @@ parser.on('headers', headers => {

{
"name": "mailparser",
"version": "2.4.1",
"version": "2.4.2",
"description": "Parse e-mails",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc