[evolution] itip-view: Ignore empty text/plain subpart in meeting invitation mail



commit 750e133b80dc0f08fb009836bab71a8c5b7ab358
Author: Milan Crha <mcrha redhat com>
Date:   Thu May 19 18:56:58 2022 +0200

    itip-view: Ignore empty text/plain subpart in meeting invitation mail
    
    When an invitation mail is part of a multipart/alternative only with
    a text/plain (and text/calendar) subparts and the text/plain is empty,
    then it could fail to read empty body, or it read empty body, which
    is not useful for showing as an alternative invitation description.

 src/modules/itip-formatter/itip-view.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/modules/itip-formatter/itip-view.c b/src/modules/itip-formatter/itip-view.c
index febd8c2279..03e7298c85 100644
--- a/src/modules/itip-formatter/itip-view.c
+++ b/src/modules/itip-formatter/itip-view.c
@@ -1854,7 +1854,8 @@ itip_view_dup_alternative_html (EMailPartItip *itip_part)
                                        flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED;
 
                                content = itip_view_util_extract_part_content (text_part, TRUE);
-                               html = camel_text_to_html (content, flags, 0);
+                               if (content && *content)
+                                       html = camel_text_to_html (content, flags, 0);
 
                                g_free (content);
                        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]