]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Store html attributes that are empty
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 17 Jul 2025 10:46:08 +0000 (11:46 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 17 Jul 2025 10:46:08 +0000 (11:46 +0100)
If we see something like <div class=""> we were not storing attribute at all!

src/libserver/html/html.cxx

index fff2692da6484e5e097a5ad709d695e566582f8d..78a6a975c9486741e626d020c79c03ee542e18b6 100644 (file)
@@ -1121,6 +1121,7 @@ html_parse_tag_content(rspamd_mempool_t *pool,
 
        case parse_start_dquote:
                if (*in == '"') {
+                       store_component_value();
                        state = spaces_after_param;
                }
                else {
@@ -1131,6 +1132,7 @@ html_parse_tag_content(rspamd_mempool_t *pool,
 
        case parse_start_squote:
                if (*in == '\'') {
+                       store_component_value();
                        state = spaces_after_param;
                }
                else {