commit 23b52c3: [Minor] Fix one more corner case
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Jul 21 14:14:07 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-07-21 15:13:27 +0100
URL: https://github.com/rspamd/rspamd/commit/23b52c3eb70ba4a81d0eb84e7a1b4812027f1035 (HEAD -> master)
[Minor] Fix one more corner case
---
src/libserver/html/html.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index d60210ba6..6cf3b959d 100644
--- a/src/libserver/html/html.cxx
+++ b/src/libserver/html/html.cxx
@@ -1191,9 +1191,10 @@ html_append_tag_content(rspamd_mempool_t *pool,
/* Add a space */
hc->parsed += ' ';
}
+
hc->parsed.append(maybe_alt.value());
- if (!g_ascii_isspace (hc->parsed.back())) {
+ if (!hc->parsed.empty() && !g_ascii_isspace (hc->parsed.back())) {
/* Add a space */
hc->parsed += ' ';
}
More information about the Commits
mailing list