Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

gumbo-next #295

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0340cad
Add a token type for CDATA.
nostrademons Nov 9, 2014
f9a515f
Add a state flag for whether the tokenizer is in a cdata section, and…
nostrademons Nov 9, 2014
58d5fad
Add CDATA handling to parser, including a test for it.
nostrademons Nov 10, 2014
fa3a71d
Add test for CDATA sections not in foreign content.
nostrademons Nov 10, 2014
2b804fa
Fix a couple comment issues (line-wrapping, unfinished comments) in u…
nostrademons Nov 10, 2014
8b867b4
Print the decimal value of the current character in the debug output …
nostrademons Nov 10, 2014
3f6012a
Add test for unsafe cdata.
nostrademons Dec 15, 2014
fe28c18
Fix missing case statement for GUMBO_TOKEN_CDATA in handle_parser_err…
nostrademons Feb 11, 2015
b6c9617
Additional debugging instructions.
nostrademons Feb 11, 2015
adc4c76
Add a test for utf8iterator_maybe_consume_match followed by a null.
nostrademons Feb 17, 2015
29f48f2
Update parser and tokenizer tests with testcases for null CDATA, and …
nostrademons Feb 17, 2015
7fea4b5
Fix handling of nulls in CDATA sections.
nostrademons Feb 17, 2015
4383a40
First pass at getting template changes on top of new master
kevinhendricks Feb 14, 2015
d8f369d
Update python interface for template changes
kevinhendricks Feb 14, 2015
975cfcf
Add in template parser.cc tests and fixes for parser.c
kevinhendricks Feb 14, 2015
ac84d02
Recognize templates in serialize and prettyprint
kevinhendricks Feb 14, 2015
ed9c9e5
Add in - Fix additional html5lib tests #291
kevinhendricks Feb 14, 2015
4d1efca
Fix template not handled to spec in handle_in_table
kevinhendricks Feb 14, 2015
61fc188
Fix bug in handle_in_template to meet spec
kevinhendricks Feb 14, 2015
f236a8c
Add in require rtc tag
kevinhendricks Feb 15, 2015
7d433e0
Fix bug in reset appropriate insertion mode for select
kevinhendricks Feb 15, 2015
befeb12
Merge in implementation of get_appropriate_insertion_location
kevinhendricks Feb 15, 2015
a2f9e41
Add get_appropriate_insertion_location to reconstruct active formatti…
kevinhendricks Feb 15, 2015
723a5f7
In body properly handle html tag when template exists
kevinhendricks Feb 15, 2015
57bce0f
Spec Fixes handle_in_column_group
kevinhendricks Feb 15, 2015
328c9e1
Fix handling of EOF token in handle_in_table to be spec
kevinhendricks Feb 15, 2015
49a5194
Fix EOF token handling to meet spec in handle_in_select
kevinhendricks Feb 16, 2015
d24c9d4
memory: Simplify the memory allocator implementation
vmg Feb 16, 2015
c34e2d9
tags: Use a perfect hash for lookups
vmg Feb 16, 2015
4d8ae0b
parser: Simplify the `element_in_specific_scope` calls
vmg Feb 16, 2015
72a2be1
parser: Implement fragment parsing
vmg Feb 16, 2015
d59e569
parser: Enable these SVG attribute replacements
vmg Feb 16, 2015
2df0efc
travis: Use GTest 1.7.0
vmg Feb 16, 2015
ee05f9f
Fix compilation in Mac OS X
vmg Feb 17, 2015
a87add3
tags: Automatically generate tag data
vmg Feb 17, 2015
62fd3e2
tokenizer: Refactor ASCII-only helpers
vmg Feb 17, 2015
b6dcb36
parser: Export create_node
vmg Feb 17, 2015
37479c5
attribute: Export the attribute helpers
vmg Feb 17, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add in - Fix additional html5lib tests #291
  • Loading branch information
kevinhendricks authored and vmg committed Feb 17, 2015
commit ed9c9e56896f0ea6a7e144e999780dc560bc6ccd
16 changes: 8 additions & 8 deletions src/parser.c
Original file line number Diff line number Diff line change
@@ -197,20 +197,20 @@ typedef struct _ReplacementEntry {
{ GUMBO_STRING(from), GUMBO_STRING(to) }

// Static data for SVG attribute replacements.
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#adjust-svg-attributes
// https://html.spec.whatwg.org/multipage/syntax.html#creating-and-inserting-nodes
static const ReplacementEntry kSvgAttributeReplacements[] = {
REPLACEMENT_ENTRY("attributename", "attributeName"),
REPLACEMENT_ENTRY("attributetype", "attributeType"),
REPLACEMENT_ENTRY("basefrequency", "baseFrequency"),
REPLACEMENT_ENTRY("baseprofile", "baseProfile"),
REPLACEMENT_ENTRY("calcmode", "calcMode"),
REPLACEMENT_ENTRY("clippathunits", "clipPathUnits"),
REPLACEMENT_ENTRY("contentscripttype", "contentScriptType"),
REPLACEMENT_ENTRY("contentstyletype", "contentStyleType"),
// REPLACEMENT_ENTRY("contentscripttype", "contentScriptType"),
// REPLACEMENT_ENTRY("contentstyletype", "contentStyleType"),
REPLACEMENT_ENTRY("diffuseconstant", "diffuseConstant"),
REPLACEMENT_ENTRY("edgemode", "edgeMode"),
REPLACEMENT_ENTRY("externalresourcesrequired", "externalResourcesRequired"),
REPLACEMENT_ENTRY("filterres", "filterRes"),
// REPLACEMENT_ENTRY("externalresourcesrequired", "externalResourcesRequired"),
// REPLACEMENT_ENTRY("filterres", "filterRes"),
REPLACEMENT_ENTRY("filterunits", "filterUnits"),
REPLACEMENT_ENTRY("glyphref", "glyphRef"),
REPLACEMENT_ENTRY("gradienttransform", "gradientTransform"),
@@ -1488,7 +1488,7 @@ static bool has_an_element_in_select_scope(GumboParser* parser, GumboTag tag) {
static void generate_implied_end_tags(GumboParser* parser, GumboTag exception) {
for (;
node_tag_in_set(get_current_node(parser), (gumbo_tagset) { TAG(DD), TAG(DT),
TAG(LI), TAG(OPTION), TAG(OPTGROUP), TAG(P), TAG(RP), TAG(RT) }) &&
TAG(LI), TAG(OPTION), TAG(OPTGROUP), TAG(P), TAG(RP), TAG(RB), TAG(RT) }) &&
!node_html_tag_is(get_current_node(parser), exception);
pop_current_node(parser));
}
@@ -2476,7 +2476,7 @@ static bool handle_in_body(GumboParser* parser, GumboToken* token) {
} else if (tag_in(token, kStartTag, (gumbo_tagset) { TAG(ADDRESS), TAG(ARTICLE),
TAG(ASIDE), TAG(BLOCKQUOTE), TAG(CENTER), TAG(DETAILS),
TAG(DIR), TAG(DIV), TAG(DL), TAG(FIELDSET), TAG(FIGCAPTION),
TAG(FIGURE), TAG(FOOTER), TAG(HEADER), TAG(HGROUP), TAG(MENU),
TAG(FIGURE), TAG(FOOTER), TAG(HEADER), TAG(HGROUP), TAG(MENU), TAG(MAIN),
TAG(NAV), TAG(OL), TAG(P), TAG(SECTION), TAG(SUMMARY), TAG(UL) })) {
bool result = maybe_implicitly_close_p_tag(parser, token);
insert_element_from_token(parser, token);
@@ -2541,7 +2541,7 @@ static bool handle_in_body(GumboParser* parser, GumboToken* token) {
TAG(ASIDE), TAG(BLOCKQUOTE), TAG(BUTTON), TAG(CENTER), TAG(DETAILS),
TAG(DIR), TAG(DIV), TAG(DL), TAG(FIELDSET), TAG(FIGCAPTION),
TAG(FIGURE), TAG(FOOTER), TAG(HEADER), TAG(HGROUP), TAG(LISTING),
TAG(MENU), TAG(NAV), TAG(OL), TAG(PRE),
TAG(MAIN), TAG(MENU), TAG(NAV), TAG(OL), TAG(PRE),
TAG(SECTION), TAG(SUMMARY), TAG(UL) })) {
GumboTag tag = token->v.end_tag;
if (!has_an_element_in_scope(parser, tag)) {