/* Should never be in attribute names but ignored */
tag->flags |= FL_BROKEN;
}
- else {
- store_value_character(true);
- }
+
+ store_value_character(true);
}
break;
hc->flags |= RSPAMD_HTML_FLAG_BAD_ELEMENTS;
tag->flags |= FL_BROKEN;
store_component_value();
+ store_value_character(true);
state = spaces_after_param;
}
else {
/* Empty attribute */
store_component_value();
+ store_value_character(true);
state = spaces_after_param;
}
}
else if (*in == '=') {
/* Attributes cannot start with '=' */
tag->flags |= FL_BROKEN;
+ store_value_character(true);
+ state = parse_attr_name;
}
else {
store_value_character(true);
{
using namespace std::string_literals;
const std::vector<std::pair<std::string, std::vector<std::string>>> cases{
- {"<a href=\"https://example.com\">test</a>", {"https://example.com"}}
+ {"<a href=\"https://example.com\">test</a>", {"https://example.com"}},
+ {"<a <poo href=\"http://example.com\">hello</a>", {"http://example.com"}},
};
rspamd_url_init(NULL);
g_byte_array_free(tmp, TRUE);
g_ptr_array_free(purls, TRUE);
}
+ ++i;
}
rspamd_mempool_delete(pool);