diff options
author | Rupinder Singh Khokhar <rsk1coder99@gmail.com> | 2014-07-04 08:57:10 +0530 |
---|---|---|
committer | Rupinder Singh Khokhar <rsk1coder99@gmail.com> | 2014-08-01 21:44:31 +0530 |
commit | ea324e5503e4a076d6aef68ce281e28a7ab06a32 (patch) | |
tree | 6bea3df388ccb12e2953045ab79e2b51d006281a /src/treebuilder/in_table.c | |
parent | 57abb7e471669e31e851743763774ddd6b7fafb4 (diff) | |
download | libhubbub-ea324e5503e4a076d6aef68ce281e28a7ab06a32.tar.gz libhubbub-ea324e5503e4a076d6aef68ce281e28a7ab06a32.tar.bz2 |
Fixing some steps in table insertion mode, handling input tags
Diffstat (limited to 'src/treebuilder/in_table.c')
-rw-r--r-- | src/treebuilder/in_table.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/treebuilder/in_table.c b/src/treebuilder/in_table.c index d86a908..908d5ad 100644 --- a/src/treebuilder/in_table.c +++ b/src/treebuilder/in_table.c @@ -51,13 +51,17 @@ static inline hubbub_error process_input_in_table( for (i = 0; i < token->data.tag.n_attributes; i++) { hubbub_attribute *attr = &token->data.tag.attributes[i]; - if (!hubbub_string_match_ci(attr->value.ptr, attr->value.len, - (uint8_t *) "hidden", SLEN("hidden"))) { + if (!(hubbub_string_match_ci(attr->name.ptr, attr->name.len, + (uint8_t *) "type", SLEN("type")) && + hubbub_string_match_ci(attr->value.ptr, attr->value.len, + (uint8_t *) "hidden", SLEN("hidden")))) { continue; } /** \todo parse error */ - err = insert_element(treebuilder, &token->data.tag, true); + err = insert_element(treebuilder, &token->data.tag, false); + break; + /** \todo ack sc */ } return err; @@ -192,7 +196,10 @@ hubbub_error handle_in_table(hubbub_treebuilder *treebuilder, treebuilder->context.mode = IN_TABLE_BODY; } else if (type == TABLE) { /** \todo parse error */ - + if(!element_in_scope(treebuilder, TABLE, TABLE_SCOPE)) { + /** \todo parse error */ + break; + } /* This should match "</table>" handling */ element_stack_pop_until(treebuilder, TABLE); |