aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/html.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-05 11:11:12 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-05 11:11:12 +0100
commit832e08e53f2364bda26afc6498ce968874d0fb33 (patch)
tree922dbeaffa99190b192d03b49fcb357b70f49462 /src/libserver/html.h
parenta976f102cda0df5d85f46d471273d9b5a7a231a5 (diff)
downloadrspamd-832e08e53f2364bda26afc6498ce968874d0fb33.tar.gz
rspamd-832e08e53f2364bda26afc6498ce968874d0fb33.zip
[Fix] Further fixes in HTML tags parsing
Diffstat (limited to 'src/libserver/html.h')
-rw-r--r--src/libserver/html.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libserver/html.h b/src/libserver/html.h
index eb8ca8070..35af8f05c 100644
--- a/src/libserver/html.h
+++ b/src/libserver/html.h
@@ -77,10 +77,22 @@ struct html_block {
gchar *class;
};
+/* Public tags flags */
+/* XML tag */
+#define FL_XML (1 << 23)
+/* Closing tag */
+#define FL_CLOSING (1 << 24)
+/* Fully closed tag (e.g. <a attrs />) */
+#define FL_CLOSED (1 << 25)
+#define FL_BROKEN (1 << 26)
+#define FL_IGNORE (1 << 27)
+#define FL_BLOCK (1 << 28)
+
struct html_tag {
gint id;
gint flags;
gsize content_length;
+ const gchar *content;
struct html_tag_component name;
GQueue *params;
gpointer extra; /** Additional data associated with tag (e.g. image) */
@@ -124,6 +136,13 @@ gboolean rspamd_html_tag_seen (struct html_content *hc, const gchar *tagname);
const gchar* rspamd_html_tag_by_id (gint id);
/**
+ * Returns HTML tag id by name
+ * @param name
+ * @return
+ */
+gint rspamd_html_tag_by_name (const gchar *name);
+
+/**
* Extract URL from HTML tag component and sets component elements if needed
* @param pool
* @param start