Comparing version 0.2.10 to 0.2.11
@@ -298,3 +298,3 @@ var convert = require("encoding").convert, | ||
match = str.match(/^\=\?([\w_\-]+)\?([QB])\?([^\?]+)\?\=$/i); | ||
match = str.match(/^\=\?([\w_\-]+)\?([QqBb])\?([^\?]+)\?\=$/i); | ||
if(!match){ | ||
@@ -325,3 +325,3 @@ return convert(str, toCharset); | ||
replace(/(=\?[^?]+\?[QqBb]\?[^?]+\?=)\s+(?==\?[^?]+\?[QqBb]\?[^?]+\?=)/g, "$1"). | ||
replace(/\=\?([\w_\-]+)\?([QB])\?[^\?]+\?\=/g, (function(mimeWord, charset, encoding){ | ||
replace(/\=\?([\w_\-]+)\?([QqBb])\?[^\?]+\?\=/g, (function(mimeWord, charset, encoding){ | ||
@@ -328,0 +328,0 @@ curCharset = charset + encoding; |
{ | ||
"name": "mimelib", | ||
"description": "MIME functions to encode/decode e-mails etc.", | ||
"version": "0.2.10", | ||
"version": "0.2.11", | ||
"author" : "Andris Reinman", | ||
@@ -6,0 +6,0 @@ "homepage":"http://github.com/andris9/mimelib", |
@@ -54,3 +54,3 @@ # mimelib | ||
=?UTF-8?q?See_on_=C3=B5hin_test?= | ||
=?UTF-8?Q?See_on_=C3=B5hin_test?= | ||
@@ -67,3 +67,3 @@ ### decodeMimeWord | ||
mimelib.decodeMimeWord("=?UTF-8?q?See_on_=C3=B5hin_test?="); | ||
mimelib.decodeMimeWord("=?UTF-8?Q?See_on_=C3=B5hin_test?="); | ||
@@ -168,3 +168,3 @@ will become | ||
mimelib.parseMimeWords("Hello: =?UTF-8?q?See_on_=C3=B5hin_test?="); | ||
mimelib.parseMimeWords("Hello: =?UTF-8?Q?See_on_=C3=B5hin_test?="); | ||
@@ -171,0 +171,0 @@ Results in |
@@ -12,2 +12,9 @@ var testCase = require('nodeunit').testCase, | ||
"parseMimeWords example": function(test){ | ||
test.equal("Hello: See on õhin test", mimelib.parseMimeWords("Hello: =?UTF-8?q?See_on_=C3=B5hin_test?=")); | ||
test.equal("=?UTF-8?Q?See_on_=C3=B5hin_test?=", mimelib.encodeMimeWord("See on õhin test")); | ||
test.equal("See on õhin test", mimelib.decodeMimeWord("=?UTF-8?q?See_on_=C3=B5hin_test?=")); | ||
test.done(); | ||
}, | ||
"Don't wrap between encoded chars": function(test){ | ||
@@ -14,0 +21,0 @@ var wrapped = "a__________________________", |
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
649709
800