Closed Bug 1575636 Opened 5 years ago Closed 5 years ago

When replying to a saved message with embedded image, a blocked image notification comes up

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
normal

Tracking

(thunderbird_esr6869+ fixed, thunderbird69 fixed, thunderbird70 fixed)

RESOLVED FIXED
Thunderbird 70.0
Tracking Status
thunderbird_esr68 69+ fixed
thunderbird69 --- fixed
thunderbird70 --- fixed

People

(Reporter: jorgk-bmo, Assigned: jorgk-bmo)

Details

Attachments

(1 file)

When replying to a saved message with embedded image, a blocked image notification comes up.

Test message for example
https://searchfox.org/comm-central/source/mailnews/test/data/05-HTML+embedded-image.eml

When forwarding the same message, no blocked image notification comes up.

Found while looking at bug 1575330.

Add

      dump(`=== ${src}\n`);
      dump(`=== ${originalMsgNeckoURI.value.spec}\n`);

before
https://searchfox.org/comm-central/rev/3d360e890307be83b936f8604a80744bde81387e/mail/components/compose/content/MsgComposeCommands.js#6724

And you'll see this:

Forward:
=== mailbox:///C:/mozilla-source/comm-central/comm/mailnews/test/data/05-HTML+embedded-image.eml?fetchCompleteMessage=true&number=0&part=1.2&filename=kigaaldcbanejcbi.png
=== mailbox:///C:/mozilla-source/comm-central/comm/mailnews/test/data/05-HTML+embedded-image.eml?type=application/x-message-display&fetchCompleteMessage=true&number=0
The code strips type=application/x-message-display so src starts with the Necko spec.

Reply:
=== mailbox:///C:/mozilla-source/comm-central/comm/mailnews/test/data/05-HTML+embedded-image.eml?number=0&header=quotebody&part=1.2&filename=kigaaldcbanejcbi.png
=== file:///C:/mozilla-source/comm-central/comm/mailnews/test/data/05-HTML+embedded-image.eml?type=application/x-message-display

So they don't match. Uff. I though this would be easy to fix, but no.

Total hack, but works ;-) - We forgot this case when fixing bug 1412639.

Attachment #9087187 - Flags: review?(acelists)
Comment on attachment 9087187 [details] [diff] [review] 1575636-reply-from-file.patch Review of attachment 9087187 [details] [diff] [review]: ----------------------------------------------------------------- OK, this supresses the notification. If the number=0 is always present and constant for a saved message then this could work. Thanks. ::: mail/components/compose/content/MsgComposeCommands.js @@ +6722,5 @@ > let originalMsgNeckoURI = {}; > msgSvc.GetUrlForUri(gOriginalMsgURI, originalMsgNeckoURI, null); > if (src.startsWith(removeQueryPart(originalMsgNeckoURI.value.spec, > + "type=application/x-message-display")) > + || A bit strange placement. What will all the beautifiers do with this? :)
Attachment #9087187 - Flags: review?(acelists) → review+

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/a255e8f77470
Handle saved message with embedded images better on reply. r=aceman

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 70.0
Attachment #9087187 - Flags: approval-comm-esr68?
Attachment #9087187 - Flags: approval-comm-beta+
Attachment #9087187 - Flags: approval-comm-esr68? → approval-comm-esr68+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: