From f1c5abc455ac249754333f3b51528cd780ab072b Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Fri, 21 Oct 2022 12:19:47 -0400 Subject: [PATCH] html5: remove parse error around whitespace in template and update to the latest html5lib-tests See: - https://github.com/whatwg/html/issues/7922 - https://github.com/whatwg/html/pull/8271 - https://github.com/html5lib/html5lib-tests/pull/150 - https://github.com/html5lib/html5lib-tests/pull/151 --- CHANGELOG.md | 4 +++- gumbo-parser/src/parser.c | 2 +- test/html5lib-tests | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2e71c64199..ee2466a6467 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,6 @@ This version of Nokogiri uses [`jar-dependencies`](https://github.com/mkristian/ ### Added -* [CRuby] The HTML5 parser handles the [new `search` element](https://github.com/whatwg/html/pull/7320). [#2566](https://github.com/sparklemotion/nokogiri/issues/2566) * [CRuby] Invocation of custom XPath or CSS handler functions may now use the `nokogiri` namespace prefix. Historically, the JRuby implementation _required_ this namespace but the CRuby implementation did not support it. It's recommended that all XPath and CSS queries use the `nokogiri` namespace going forward. Invocation without the namespace is planned for deprecation in v1.15.0 and removal in a future release. [[#2147](https://github.com/sparklemotion/nokogiri/issues/2147)] @@ -51,6 +50,9 @@ This version of Nokogiri uses [`jar-dependencies`](https://github.com/mkristian/ ### Improved +* HTML5 spec changes: + - [Add the element by domenic · Pull Request #7320 · whatwg/html](https://github.com/whatwg/html/pull/7320) + - [Remove parse error for by zcorpan · Pull Request #8271 · whatwg/html](https://github.com/whatwg/html/pull/8271) * Serialization of HTML5 documents and fragments has been re-implemented and is ~10x faster than previous versions. [[#2596](https://github.com/sparklemotion/nokogiri/issues/2596), [#2569](https://github.com/sparklemotion/nokogiri/issues/2569)] * Parsing of HTML5 documents is ~90% faster thanks to additional compiler optimizations being applied. [[#2639](https://github.com/sparklemotion/nokogiri/issues/2639)] * `Document#canonicalize` now raises an exception if `inclusive_namespaces` is non-nil and the mode is inclusive, i.e. XML_C14N_1_0 or XML_C14N_1_1. `inclusive_namespaces` can only be passed with exclusive modes, and previously this silently failed. diff --git a/gumbo-parser/src/parser.c b/gumbo-parser/src/parser.c index a4f55274011..717f57f732a 100644 --- a/gumbo-parser/src/parser.c +++ b/gumbo-parser/src/parser.c @@ -3437,7 +3437,7 @@ static void handle_in_table(GumboParser* parser, GumboToken* token) { || token->type == GUMBO_TOKEN_WHITESPACE || token->type == GUMBO_TOKEN_NULL) && node_tag_in_set(get_current_node(parser), &(const TagSet) { - TAG(TABLE), TAG(TBODY), TAG(TFOOT), TAG(THEAD), TAG(TR) + TAG(TABLE), TAG(TBODY), TAG(TEMPLATE), TAG(TFOOT), TAG(THEAD), TAG(TR) }) ) { // The "pending table character tokens" list described in the spec is diff --git a/test/html5lib-tests b/test/html5lib-tests index e3e6e150d4e..dd0d8157f15 160000 --- a/test/html5lib-tests +++ b/test/html5lib-tests @@ -1 +1 @@ -Subproject commit e3e6e150d4e1ade63d9d951381921a1fa31c25a2 +Subproject commit dd0d8157f15ebf35655cc0c8df2d476cda3ceba2