html->flags |= FL_XML;
html->tag = NULL;
}
+ else if (*text == '!') {
+ html->flags |= FL_SGML;
+ html->tag = NULL;
+ }
else {
if (*text == '/') {
html->flags |= FL_CLOSING;
part->is_balanced = FALSE;
}
}
- else {
+ else if ((data->flags & (FL_XML|FL_SGML)) == 0) {
g_node_append (*cur_level, new);
if ((data->flags & FL_CLOSED) == 0) {
#define FL_CLOSING (1 << 1)
/* Fully closed tag (e.g. <a attrs />) */
#define FL_CLOSED (1 << 2)
+/* <! SGML tag */
+#define FL_SGML (1 << 3)
struct html_tag {
tag_id_t id;