Comparing version 2.1.1 to 2.1.2
# Changelog | ||
## v2.1.2 2016-11-21 | ||
* Quote special symbols as defined in RFC (surajwy) | ||
## v2.1.1 2016-11-15 | ||
@@ -4,0 +8,0 @@ |
@@ -330,3 +330,4 @@ 'use strict'; | ||
* Joins parsed header value together as 'value; param1=value1; param2=value2' | ||
* | ||
* PS: We are following RFC 822 for the list of special characters that we need to keep in quotes. | ||
* Refer: https://www.w3.org/Protocols/rfc1341/4_Content-Type.html | ||
* @param {Object} structured Parsed header value | ||
@@ -343,3 +344,3 @@ * @return {String} joined header value | ||
libmime.buildHeaderParam(param, value, 50).forEach(function (encodedParam) { | ||
if (!/[\s"\\;\/=\(\),]|^[\-']|'$/.test(encodedParam.value) || encodedParam.key.substr(-1) === '*') { | ||
if (!/[\s"\\;:\/=\(\),<>@\[\]\?\.]|^[\-']|'$/.test(encodedParam.value) || encodedParam.key.substr(-1) === '*') { | ||
paramsArray.push(encodedParam.key + '=' + encodedParam.value); | ||
@@ -350,3 +351,3 @@ } else { | ||
}); | ||
} else if (/[\s'"\\;\/=\(\),]|^\-/.test(value)) { | ||
} else if (/[\s'"\\;:\/=\(\),<>@\[\]\?\.]|^\-/.test(value)) { | ||
paramsArray.push(param + '=' + JSON.stringify(value)); | ||
@@ -353,0 +354,0 @@ } else { |
{ | ||
"name": "libmime", | ||
"description": "Encode and decode quoted printable and base64 strings", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"main": "lib/libmime", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/andris9/libmime", |
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
136917
2869