Comparing version 0.1.8 to 0.1.9
@@ -193,6 +193,13 @@ var Iconv = require("iconv").Iconv; | ||
} | ||
// if there are some invalid = symbols convert these to quoted-printable | ||
// notation, otherwise decodeURICompontent throws an error | ||
str = str.replace(/\=(?![a-f0-9]{2})/ig,"=3D"); | ||
// convert quoted-printable to urlencoded | ||
str = str.replace(/%/g,'%25').replace(/\=/g,"%"); | ||
if(charset == "UTF-8"){ | ||
str = decodeURIComponent(str.replace(/%/g,'%25').replace(/\=/g,"%")); | ||
str = decodeURIComponent(str); | ||
}else{ | ||
str = str.replace(/%/g,'%25').replace(/\=/g,"%"); | ||
if(charset=="ISO-8859-1" || charset=="LATIN1") | ||
@@ -363,4 +370,6 @@ str = unescape(str); | ||
} | ||
if(email) | ||
if(email){ | ||
addressArr.push({address:decodeURIComponent(email), name: decodeURIComponent(name || "")}); | ||
} | ||
} | ||
@@ -367,0 +376,0 @@ return addressArr; |
{ | ||
"name": "mimelib", | ||
"description": "MIME functions to encode/decode e-mails etc.", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"author" : "Andris Reinman", | ||
@@ -6,0 +6,0 @@ "homepage":"http://github.com/andris9/mimelib", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30544
489