From: Vsevolod Stakhov Date: Tue, 8 Nov 2016 09:54:07 +0000 (+0300) Subject: [Fix] Fix parsing of unquoted HTML attributes X-Git-Tag: 1.4.0~99 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=21ad2c88b1b38366f7e27e964603cafb5360d456;p=rspamd.git [Fix] Fix parsing of unquoted HTML attributes Issue: #1092 Reported by: @moisseev --- diff --git a/src/libserver/html.c b/src/libserver/html.c index d36b8d6db..94ac6915f 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -1178,13 +1178,15 @@ rspamd_html_parse_tag_content (rspamd_mempool_t *pool, break; case parse_value: - if (g_ascii_isspace (*in) || *in == '>' || *in == '/') { - if (*in == '/') { - tag->flags |= FL_CLOSED; - } + if (*in == '/' && *(in + 1) == '>') { + tag->flags |= FL_CLOSED; + store = TRUE; + } + else if (g_ascii_isspace (*in) || *in == '>') { store = TRUE; state = spaces_after_param; } + if (store) { if (*savep != NULL) { g_assert (tag->params != NULL);