aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-08 12:54:07 +0300
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-08 12:54:47 +0300
commit21ad2c88b1b38366f7e27e964603cafb5360d456 (patch)
tree6fd21f696f5b98beab1d991ed965bd45e04d1391
parent183d73976f64a8777f64c49438ca8d51b5217ce6 (diff)
downloadrspamd-21ad2c88b1b38366f7e27e964603cafb5360d456.tar.gz
rspamd-21ad2c88b1b38366f7e27e964603cafb5360d456.zip
[Fix] Fix parsing of unquoted HTML attributes
Issue: #1092 Reported by: @moisseev
-rw-r--r--src/libserver/html.c10
1 files changed, 6 insertions, 4 deletions
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);