summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-23 16:01:46 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-23 16:01:46 +0100
commitca5d2eddbf04b993659fb86d3895de3e5148b61a (patch)
tree1779dd36a03b94e9c4d59e9913f41495656dfff0 /src
parent8bf359e9f41aff57695967c6ae8ac623e5ac941e (diff)
downloadrspamd-ca5d2eddbf04b993659fb86d3895de3e5148b61a.tar.gz
rspamd-ca5d2eddbf04b993659fb86d3895de3e5148b61a.zip
[Minor] Fix newlines inserting in HTML block tags
Diffstat (limited to 'src')
-rw-r--r--src/libserver/html.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c
index dc76d7fe5..2ae4a3ba2 100644
--- a/src/libserver/html.c
+++ b/src/libserver/html.c
@@ -1135,7 +1135,8 @@ rspamd_html_parse_tag_component (rspamd_mempool_t *pool,
NEW_COMPONENT (RSPAMD_HTML_COMPONENT_HREF);
}
}
- else if (tag->id == Tag_IMG) {
+
+ if (tag->id == Tag_IMG) {
/* Check width and height if presented */
if (len == 5 && g_ascii_strncasecmp (p, "width", len) == 0) {
NEW_COMPONENT (RSPAMD_HTML_COMPONENT_WIDTH);
@@ -2850,10 +2851,10 @@ rspamd_html_process_part_full (rspamd_mempool_t *pool, struct html_content *hc,
}
save_space = FALSE;
}
- else if ((cur_tag->flags & (FL_CLOSED|FL_CLOSING)) &&
- (cur_tag->id == Tag_P ||
+
+ if ((cur_tag->id == Tag_P ||
cur_tag->id == Tag_TR ||
- cur_tag->id == Tag_DIV) && balanced) {
+ cur_tag->id == Tag_DIV)) {
if (dest->len > 0 && dest->data[dest->len - 1] != '\n') {
g_byte_array_append (dest, "\r\n", 2);
}