New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 0.5.2 to 0.5.3

8

lib/mailparser.js

@@ -592,3 +592,3 @@ "use strict";

parts = value.match(/(?:[^;"]+|"[^"]*")+/g) ||  [value];
parts = value.match(/(?:[^;"]+|"[^"]*")+/g) || [value];
returnValue.defaultValue = parts.shift().toLowerCase();

@@ -953,4 +953,4 @@

if (this._currentNode.meta.contentType == "text/html") {
this._currentNode.meta.charset = this._detectHTMLCharset(this._currentNode.content) || this._currentNode.meta.charset || this.options.defaultCharset || "iso-8859-1";
if (this._currentNode.meta.contentType == "text/html" && !this._currentNode.meta.charset) {
this._currentNode.meta.charset = this._detectHTMLCharset(this._currentNode.content) || this.options.defaultCharset || "iso-8859-1";
}

@@ -1495,2 +1495,2 @@

return charset;
};
};
{
"name": "mailparser",
"description": "Asynchronous and non-blocking parser for mime encoded e-mail messages",
"version": "0.5.2",
"version": "0.5.3",
"author": "Andris Reinman",

@@ -23,3 +23,3 @@ "maintainers": [{

"mime": "^1.3.4",
"uue": "^2.1.1"
"uue": "^3.0.0"
},

@@ -26,0 +26,0 @@ "devDependencies": {

@@ -343,17 +343,2 @@ "use strict";

"HTML encoding: Conflicting headers": function(test) {
var encodedText = "Content-Type: text/html; charset=iso-8859-1\r\n" +
"\r\n" +
"<html><head><meta charset=\"utf-8\"/></head><body>ÕÄÖÜ",
mail = new Buffer(encodedText, "utf-8");
test.expect(1);
var mailparser = new MailParser();
mailparser.end(mail);
mailparser.on("end", function(mail) {
test.equal((mail.html || "").substr(-4), "ÕÄÖÜ");
test.done();
});
},
"HTML encoding: Header defined": function(test) {

@@ -360,0 +345,0 @@ var encodedText = "Content-Type: text/html; charset=iso-UTF-8\r\n" +

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