summaryrefslogtreecommitdiffstats
path: root/src/libserver/html.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-14 15:08:02 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-14 15:08:02 +0000
commit46acf7be5791a164f8fa5dbc16494d8175e5b850 (patch)
tree16403abc98efcd5955cd83d57172db53c6a31b0b /src/libserver/html.c
parent659ff5ca02101ad4d8a9d8eabeb376c44519c7d1 (diff)
downloadrspamd-46acf7be5791a164f8fa5dbc16494d8175e5b850.tar.gz
rspamd-46acf7be5791a164f8fa5dbc16494d8175e5b850.zip
Ignore SGML style tags in html.
Diffstat (limited to 'src/libserver/html.c')
-rw-r--r--src/libserver/html.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c
index fdb6a11db..edf831238 100644
--- a/src/libserver/html.c
+++ b/src/libserver/html.c
@@ -493,6 +493,10 @@ construct_html_node (rspamd_mempool_t * pool, gchar *text, gsize tag_len)
html->flags |= FL_XML;
html->tag = NULL;
}
+ else if (*text == '!') {
+ html->flags |= FL_SGML;
+ html->tag = NULL;
+ }
else {
if (*text == '/') {
html->flags |= FL_CLOSING;
@@ -972,7 +976,7 @@ add_html_node (struct rspamd_task *task,
part->is_balanced = FALSE;
}
}
- else {
+ else if ((data->flags & (FL_XML|FL_SGML)) == 0) {
g_node_append (*cur_level, new);
if ((data->flags & FL_CLOSED) == 0) {