@bobfrankston/rmfmail 1.2.214 → 1.2.215

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7842,7 +7842,8 @@ function decodeImapString(s) {
7842
7842
  if (!s)
7843
7843
  return "";
7844
7844
  const unfolded = s.replace(/\?=\s+=\?/g, "?==?");
7845
- return unfolded.replace(/=\?([^?]+)\?([BQ])\?([^?]+)\?=/gi, (_match, charset, encoding, text) => {
7845
+ const rejoined = unfolded.replace(/(=\?[^?]+\?[BQ]\?[^?]*?)\s+\?=/gi, "$1?=");
7846
+ const decodedWords = rejoined.replace(/=\?([^?]+)\?([BQ])\?([^?]+)\?=/gi, (_match, charset, encoding, text) => {
7846
7847
  try {
7847
7848
  const decoder = decoderFor(charset);
7848
7849
  if (encoding.toUpperCase() === "B") {
@@ -7870,6 +7871,7 @@ function decodeImapString(s) {
7870
7871
  return encoding.toUpperCase() === "Q" ? text.replace(/_/g, " ") : text;
7871
7872
  }
7872
7873
  });
7874
+ return decodedWords.replace(/\uFEFF/g, "");
7873
7875
  }
7874
7876
  function tokenizeParenList(s) {
7875
7877
  const tokens = [];