guint flags;
};
+#define msg_debug_html(...) rspamd_default_log_function (G_LOG_LEVEL_DEBUG, \
+ "html", pool->tag.uid, \
+ G_STRFUNC, \
+ __VA_ARGS__)
+
static struct html_tag_def tag_defs[] = {
/* W3C defined elements */
{Tag_A, "a", (0)},
if (tag->flags & FL_CLOSING) {
if (!*cur_level) {
- msg_debug_pool ("bad parent node");
+ msg_debug_html ("bad parent node");
g_node_destroy (nnode);
return FALSE;
}
g_node_append (*cur_level, nnode);
if (!rspamd_html_check_balance (nnode, cur_level)) {
- msg_debug_pool (
+ msg_debug_html (
"mark part as unbalanced as it has not pairable closing tags");
hc->flags |= RSPAMD_HTML_FLAG_UNBALANCED;
*balanced = FALSE;
if (rc == URI_ERRNO_OK &&
url->hostlen > 0) {
- msg_debug_pool ("found url %s in query of url"
+ msg_debug_html ("found url %s in query of url"
" %*s", url_str, url->querylen, url->query);
if (!g_hash_table_lookup (target,
|| (klen == 10 && g_ascii_strncasecmp (key, "font-color", 10) == 0)) {
rspamd_html_process_color (c, p - c, &bl->font_color);
- msg_debug_pool ("got color: %xd", bl->font_color.d.val);
+ msg_debug_html ("got color: %xd", bl->font_color.d.val);
}
else if ((klen == 16 && g_ascii_strncasecmp (key,
"background-color", 16) == 0) ||
"background", 10) == 0)) {
rspamd_html_process_color (c, p - c, &bl->background_color);
- msg_debug_pool ("got bgcolor: %xd", bl->background_color.d.val);
+ msg_debug_html ("got bgcolor: %xd", bl->background_color.d.val);
}
}
fstr.begin = (gchar *)comp->start;
fstr.len = comp->len;
rspamd_html_process_color (comp->start, comp->len, &bl->font_color);
- msg_debug_pool ("got color: %xd", bl->font_color.d.val);
+ msg_debug_html ("got color: %xd", bl->font_color.d.val);
}
else if (comp->type == RSPAMD_HTML_COMPONENT_BGCOLOR && comp->len > 0) {
fstr.begin = (gchar *)comp->start;
fstr.len = comp->len;
rspamd_html_process_color (comp->start, comp->len, &bl->background_color);
- msg_debug_pool ("got color: %xd", bl->font_color.d.val);
+ msg_debug_html ("got color: %xd", bl->font_color.d.val);
if (tag->id == Tag_BODY) {
/* Set global background color */
else if (comp->type == RSPAMD_HTML_COMPONENT_STYLE && comp->len > 0) {
bl->style.len = comp->len;
bl->style.start = comp->start;
- msg_debug_pool ("got style: %*s", (gint)bl->style.len, bl->style.start);
+ msg_debug_html ("got style: %*s", (gint)bl->style.len, bl->style.start);
rspamd_html_process_style (pool, bl, hc, comp->start, comp->len);
}
else if (comp->type == RSPAMD_HTML_COMPONENT_CLASS && comp->len > 0) {
fstr.begin = (gchar *)comp->start;
fstr.len = comp->len;
bl->class = rspamd_mempool_ftokdup (pool, &fstr);
- msg_debug_pool ("got class: %s", bl->class);
+ msg_debug_html ("got class: %s", bl->class);
}
cur = g_list_next (cur);