After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767438 - text not visible when there's an inline image
text not visible when there's an inline image
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: client
master
Other Linux
: Normal normal
: 0.11.1
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-09 10:29 UTC by Federico Bruni
Modified: 2016-07-06 07:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of message view before and after replying (99.24 KB, image/png)
2016-06-09 10:29 UTC, Federico Bruni
Details
message source showing embedded inline image (51.05 KB, text/plain)
2016-06-09 10:30 UTC, Federico Bruni
Details

Description Federico Bruni 2016-06-09 10:29:10 UTC
Created attachment 329448 [details]
screenshot of message view before and after replying

I attach a screenshot of what I see before and after replying and the source of the message received.
As you can see, only the inline image is visible; when I reply the text appears, while the image disappears (but this is issue #710356).

For the records, I can see a previous similar issue marked as fixed, issue #713846.
Comment 1 Federico Bruni 2016-06-09 10:30:03 UTC
Created attachment 329449 [details]
message source showing embedded inline image
Comment 2 Michael Gratton 2016-06-17 02:53:19 UTC
Okay, so I think what is happening here is that when Geary.RFC822.Message::construct_body_from_mime_parts is looking to build a message body to display, during the first pass that looks for HTML content the plain text part is ignored but the inline image gets converted to a HTML IMG element and returned as the body. This makes it look like an HTML part was found, and hence the second pass looking for plain text never starts and so text part is never found.

So we probably want to ignore inlined parts when determining if a pass found some body content, but we also want to be able to handle messages with inline-parts-only, so maybe three passes are needed  - HTML, plain text, and inline only?
Comment 3 Michael Gratton 2016-06-19 09:19:55 UTC
Fix commited to master as 5354ccb, will cherry-pick to 0.11 if no one complains about it over the next few days.

Federico, if you're running master, can you verify this fixes the issue for you? Ta!
Comment 4 Federico Bruni 2016-06-19 13:18:54 UTC
Yes, it's fixed. Thanks!
Comment 5 Michael Gratton 2016-06-23 13:49:34 UTC
Great!

I've also merged this to the geary-0.11 branch, so will be in the next release.
Comment 6 Michael Gratton 2016-07-06 07:39:08 UTC
Followup fix for critical warning when there is neither a HTML or plain text body part pushed to master as cc8b79b and geary-0.11 as 384d158.