From 8a4d73d13c8ea3bf0a2413688b59fe91e4248495 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 15 Oct 2020 14:30:43 +0200 Subject: [PATCH] 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; }