Skip to content

Commit 4562dfd

Browse files
committed
v2.0.3
2 parents 394e56f + a6c33e5 commit 4562dfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/mail-parser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ class MailParser extends Transform {
745745
let cids = new Map();
746746
let html = (this.html || '').toString();
747747

748-
html.replace(/\bcid:([^'"]{1,256})/g, (match, cid) => {
748+
html.replace(/\bcid:([^'"\s]{1,256})/g, (match, cid) => {
749749
for (let i = 0, len = this.attachmentList.length; i < len; i++) {
750750
if (this.attachmentList[i].cid === cid && /^image\/[\w]+$/i.test(this.attachmentList[i].contentType)) {
751751
if (/^image\/[\w]+$/i.test(this.attachmentList[i].contentType)) {
@@ -767,7 +767,7 @@ class MailParser extends Transform {
767767
let pos = 0;
768768
let processNext = () => {
769769
if (pos >= cidList.length) {
770-
html = html.replace(/\bcid:([^'"]{1,256})/g, (match, cid) => {
770+
html = html.replace(/\bcid:([^'"\s]{1,256})/g, (match, cid) => {
771771
if (cids.has(cid) && cids.get(cid).url) {
772772
return cids.get(cid).url;
773773
}

0 commit comments

Comments
 (0)