mailparser
Advanced tools
Comparing version 0.5.2 to 0.5.3
@@ -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" + |
139146
3171
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addeduue@3.1.2(transitive)
- Removedarray.prototype.findindex@1.0.0(transitive)
- Removeduue@2.1.1(transitive)
Updateduue@^3.0.0