[evolution] I#1156 - Composer: HTML email signature not stripped ][



commit 8a4d73d13c8ea3bf0a2413688b59fe91e4248495
Author: Milan Crha <mcrha redhat com>
Date:   Thu Oct 15 14:30:43 2020 +0200

    I#1156 - Composer: HTML email signature not stripped ][
    
    Missed to advance after the end of the tag, when the match has any attributes.
    
    Related to https://gitlab.gnome.org/GNOME/evolution/-/issues/1156

 src/em-format/e-mail-stripsig-filter.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/src/em-format/e-mail-stripsig-filter.c b/src/em-format/e-mail-stripsig-filter.c
index 13f7824b21..809e001df1 100644
--- a/src/em-format/e-mail-stripsig-filter.c
+++ b/src/em-format/e-mail-stripsig-filter.c
@@ -57,6 +57,16 @@ is_html_newline_marker (const gchar *text,
                gint caselen = strlen (cases[ii]);
 
                if (len >= caselen && g_ascii_strncasecmp (text, cases[ii], caselen) == 0) {
+                       if (cases[ii][caselen - 1] != '>') {
+                               /* Need to find the tag end, in a lazy way */
+                               while (text[caselen] && text[caselen] != '>')
+                                       caselen++;
+
+                               /* Advance after the '>' */
+                               if (text[caselen])
+                                       caselen++;
+                       }
+
                        *advance_by_chars = caselen;
                        return TRUE;
                }


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