nokogiri 1.16.8 → 1.18.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of nokogiri might be problematic. Click here for more details.

Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +14 -22
  3. data/LICENSE-DEPENDENCIES.md +6 -6
  4. data/README.md +8 -5
  5. data/dependencies.yml +6 -6
  6. data/ext/nokogiri/extconf.rb +188 -142
  7. data/ext/nokogiri/gumbo.c +69 -53
  8. data/ext/nokogiri/html4_document.c +10 -4
  9. data/ext/nokogiri/html4_element_description.c +18 -18
  10. data/ext/nokogiri/html4_sax_parser.c +40 -0
  11. data/ext/nokogiri/html4_sax_parser_context.c +48 -58
  12. data/ext/nokogiri/html4_sax_push_parser.c +25 -24
  13. data/ext/nokogiri/libxml2_polyfill.c +114 -0
  14. data/ext/nokogiri/nokogiri.c +9 -2
  15. data/ext/nokogiri/nokogiri.h +18 -33
  16. data/ext/nokogiri/xml_attr.c +1 -1
  17. data/ext/nokogiri/xml_cdata.c +2 -10
  18. data/ext/nokogiri/xml_comment.c +3 -8
  19. data/ext/nokogiri/xml_document.c +163 -156
  20. data/ext/nokogiri/xml_document_fragment.c +10 -25
  21. data/ext/nokogiri/xml_dtd.c +1 -1
  22. data/ext/nokogiri/xml_element_content.c +9 -9
  23. data/ext/nokogiri/xml_encoding_handler.c +4 -4
  24. data/ext/nokogiri/xml_namespace.c +6 -6
  25. data/ext/nokogiri/xml_node.c +134 -103
  26. data/ext/nokogiri/xml_node_set.c +46 -44
  27. data/ext/nokogiri/xml_reader.c +54 -58
  28. data/ext/nokogiri/xml_relax_ng.c +35 -56
  29. data/ext/nokogiri/xml_sax_parser.c +156 -88
  30. data/ext/nokogiri/xml_sax_parser_context.c +219 -131
  31. data/ext/nokogiri/xml_sax_push_parser.c +68 -49
  32. data/ext/nokogiri/xml_schema.c +50 -85
  33. data/ext/nokogiri/xml_syntax_error.c +19 -11
  34. data/ext/nokogiri/xml_text.c +2 -4
  35. data/ext/nokogiri/xml_xpath_context.c +103 -100
  36. data/ext/nokogiri/xslt_stylesheet.c +8 -8
  37. data/gumbo-parser/src/ascii.c +2 -2
  38. data/gumbo-parser/src/error.c +76 -48
  39. data/gumbo-parser/src/error.h +5 -1
  40. data/gumbo-parser/src/nokogiri_gumbo.h +11 -2
  41. data/gumbo-parser/src/parser.c +63 -25
  42. data/gumbo-parser/src/tokenizer.c +6 -6
  43. data/lib/nokogiri/class_resolver.rb +1 -1
  44. data/lib/nokogiri/css/node.rb +6 -2
  45. data/lib/nokogiri/css/parser.rb +6 -4
  46. data/lib/nokogiri/css/parser.y +2 -2
  47. data/lib/nokogiri/css/parser_extras.rb +6 -66
  48. data/lib/nokogiri/css/selector_cache.rb +38 -0
  49. data/lib/nokogiri/css/tokenizer.rb +4 -4
  50. data/lib/nokogiri/css/tokenizer.rex +9 -8
  51. data/lib/nokogiri/css/xpath_visitor.rb +42 -6
  52. data/lib/nokogiri/css.rb +86 -20
  53. data/lib/nokogiri/decorators/slop.rb +3 -5
  54. data/lib/nokogiri/encoding_handler.rb +2 -2
  55. data/lib/nokogiri/html4/document.rb +44 -23
  56. data/lib/nokogiri/html4/document_fragment.rb +124 -12
  57. data/lib/nokogiri/html4/encoding_reader.rb +1 -1
  58. data/lib/nokogiri/html4/sax/parser.rb +23 -38
  59. data/lib/nokogiri/html4/sax/parser_context.rb +4 -9
  60. data/lib/nokogiri/html4.rb +9 -14
  61. data/lib/nokogiri/html5/builder.rb +40 -0
  62. data/lib/nokogiri/html5/document.rb +61 -30
  63. data/lib/nokogiri/html5/document_fragment.rb +130 -20
  64. data/lib/nokogiri/html5/node.rb +4 -4
  65. data/lib/nokogiri/html5.rb +114 -72
  66. data/lib/nokogiri/version/constant.rb +1 -1
  67. data/lib/nokogiri/xml/builder.rb +8 -1
  68. data/lib/nokogiri/xml/document.rb +70 -26
  69. data/lib/nokogiri/xml/document_fragment.rb +84 -13
  70. data/lib/nokogiri/xml/node.rb +82 -11
  71. data/lib/nokogiri/xml/node_set.rb +9 -7
  72. data/lib/nokogiri/xml/parse_options.rb +1 -1
  73. data/lib/nokogiri/xml/pp/node.rb +6 -1
  74. data/lib/nokogiri/xml/reader.rb +46 -13
  75. data/lib/nokogiri/xml/relax_ng.rb +57 -20
  76. data/lib/nokogiri/xml/sax/document.rb +174 -83
  77. data/lib/nokogiri/xml/sax/parser.rb +115 -41
  78. data/lib/nokogiri/xml/sax/parser_context.rb +116 -8
  79. data/lib/nokogiri/xml/sax/push_parser.rb +3 -0
  80. data/lib/nokogiri/xml/sax.rb +48 -0
  81. data/lib/nokogiri/xml/schema.rb +112 -45
  82. data/lib/nokogiri/xml/searchable.rb +38 -42
  83. data/lib/nokogiri/xml/syntax_error.rb +22 -0
  84. data/lib/nokogiri/xml/xpath_context.rb +14 -3
  85. data/lib/nokogiri/xml.rb +13 -24
  86. data/lib/nokogiri/xslt.rb +3 -9
  87. data/lib/xsd/xmlparser/nokogiri.rb +3 -4
  88. data/patches/libxml2/0019-xpath-Use-separate-static-hash-table-for-standard-fu.patch +244 -0
  89. data/ports/archives/libxml2-2.13.5.tar.xz +0 -0
  90. data/ports/archives/libxslt-1.1.42.tar.xz +0 -0
  91. metadata +13 -12
  92. data/ext/nokogiri/libxml2_backwards_compat.c +0 -121
  93. data/patches/libxml2/0003-libxml2.la-is-in-top_builddir.patch +0 -25
  94. data/ports/archives/libxml2-2.12.9.tar.xz +0 -0
  95. data/ports/archives/libxslt-1.1.39.tar.xz +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eff0523bd350c2cd114bdd93486cd25f266ae4adc064571a108d1926776d6144
4
- data.tar.gz: 7b9ecfc54d5f1ecc8e2b843bd17b404f8c2e5577749dde52678e0c9c1350f3b6
3
+ metadata.gz: 625a018bc3e4890d78d52e0c234d168e187a6d3cb6f9611da04fe9f5b887cc46
4
+ data.tar.gz: 3f542a6448b1134ae485801ef959e59978499b557792f7a73436735d0dc03681
5
5
  SHA512:
6
- metadata.gz: 11d6a2558416abb116410ac6b06015954287b593acdaa2c3cc2bc9daf2105d3bf197d380cce08978afc4102552450c5f7a1a9c85e41ad4307fb430cc56942dcc
7
- data.tar.gz: 3b78a83da090e5f28d300a56c5f057a6e8b29bc3a0eadd95b55d80b228c5c68cd455c4534ef1adc14a2cdc0f3ad0271e461344efe7cca1a63c3d5713eb8038fe
6
+ metadata.gz: 9a59c6ea78b7d5ad1e48a280a3bc8d04b39ce5e10b4b717a1aa53935136450acd4439d9315a534b2146a73ef601e1da043de57aa1a6bebc24157f29350003121
7
+ data.tar.gz: b3352ba9ed567401f272920bb3e5aedc1e488f9e1014bdf4929cada908d716223324275115e4e8453ac2706d9553b3030f339a40a148b4d185baadd530887659
data/Gemfile CHANGED
@@ -5,44 +5,36 @@ source "https://rubygems.org"
5
5
  gemspec
6
6
 
7
7
  group :development do
8
- # ruby 3.4.0-dev removed some gems from the default set
9
- #
10
- # TODO: we should be able to remove these as our gem dependencies sort it out and we pull them in
11
- # transitively.
12
- gem "mutex_m"
13
-
14
8
  # bootstrapping
15
9
  gem "bundler", "~> 2.3"
16
- gem "rake", "13.1.0"
10
+ gem "rake", "13.2.1"
17
11
 
18
12
  # building extensions
19
- gem "rake-compiler", "1.2.6"
20
- gem "rake-compiler-dock", "1.4.0"
13
+ gem "rake-compiler", "1.2.8"
14
+ gem "rake-compiler-dock", "1.7.0"
21
15
 
22
16
  # parser generator
23
- gem "rexical", "= 1.0.7"
17
+ gem "rexical", "1.0.8"
24
18
 
25
19
  # tests
26
- gem "minitest", "5.21.2"
20
+ gem "minitest", "5.25.4"
27
21
  gem "minitest-parallel_fork", "2.0.0"
28
- gem "ruby_memcheck", "2.3.0"
22
+ gem "ruby_memcheck", "3.0.0"
29
23
  gem "rubyzip", "~> 2.3.2"
30
24
  gem "simplecov", "= 0.21.2"
31
25
 
32
26
  # rubocop
33
- if Gem::Requirement.new("~> 3.0").satisfied_by?(Gem::Version.new(RUBY_VERSION))
34
- gem "rubocop", "1.60.2"
35
- gem "rubocop-minitest", "0.34.5"
36
- gem "rubocop-packaging", "0.5.2"
37
- gem "rubocop-performance", "1.20.2"
38
- gem "rubocop-rake", "= 0.6.0"
39
- gem "rubocop-shopify", "2.14.0"
40
- end
27
+ gem "standard", "1.43.0"
28
+ gem "rubocop-minitest", "0.36.0"
29
+ gem "rubocop-packaging", "0.5.2"
30
+ gem "rubocop-rake", "0.6.0"
41
31
  end
42
32
 
43
33
  # If Psych doesn't build, you can disable this group locally by running
44
34
  # `bundle config set --local without rdoc`
45
35
  # Then re-run `bundle install`.
46
- group :rdoc do
47
- gem "rdoc", "6.6.2"
36
+ unless RUBY_PLATFORM == "java" # see #3391 and https://github.com/jruby/jruby/issues/7262
37
+ group :rdoc do
38
+ gem "rdoc", "6.10.0"
39
+ end
48
40
  end
@@ -10,9 +10,9 @@ Note that this document is broken into multiple sections, each of which describe
10
10
 
11
11
  - [Platform Releases](#platform-releases)
12
12
  * [Default platform release ("ruby")](#default-platform-release-ruby)
13
- * [Native LinuxⓇ platform releases ("x86_64-linux", "arm64-linux", "aarch64-linux", and "arm-linux")](#native-linux%E2%93%A1-platform-releases-x86_64-linux-arm64-linux-aarch64-linux-and-arm-linux)
13
+ * [Native LinuxⓇ platform releases ("x86_64-linux", "aarch64-linux", and "arm-linux")](#native-linux%E2%93%A1-platform-releases-x86_64-linux-aarch64-linux-and-arm-linux)
14
14
  * [Native Darwin (macOSⓇ) platform releases ("x86_64-darwin" and "arm64-darwin")](#native-darwin-macos%E2%93%A1-platform-releases-x86_64-darwin-and-arm64-darwin)
15
- * [Native WindowsⓇ platform releases ("x86-mingw32" and "x64-mingw32")](#native-windows%E2%93%A1-platform-releases-x86-mingw32-and-x64-mingw32)
15
+ * [Native WindowsⓇ platform releases ("x64-mingw-ucrt")](#native-windows%E2%93%A1-platform-releases-x64-mingw-ucrt)
16
16
  * [JavaⓇ (JRuby) platform release ("java")](#java%E2%93%A1-jruby-platform-release-java)
17
17
  - [Appendix: Dependencies' License Texts](#appendix-dependencies-license-texts)
18
18
  * [libgumbo](#libgumbo)
@@ -51,7 +51,7 @@ The default platform release distributes the following dependencies in source fo
51
51
  This distribution can be identified by inspecting the included Gem::Specification, which will have the value "ruby" for its "platform" attribute.
52
52
 
53
53
 
54
- ### Native LinuxⓇ platform releases ("x86_64-linux", "arm64-linux", "aarch64-linux", and "arm-linux")
54
+ ### Native LinuxⓇ platform releases ("x86_64-linux", "aarch64-linux", and "arm-linux")
55
55
 
56
56
  The native LinuxⓇ platform release distributes the following dependencies in source form:
57
57
 
@@ -60,7 +60,7 @@ The native LinuxⓇ platform release distributes the following dependencies in s
60
60
  * [libgumbo](#libgumbo)
61
61
  * [zlib](#zlib)
62
62
 
63
- This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x86_64-linux" or "arm64-linux" for its "platform.cpu" attribute.
63
+ This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x86_64-linux" or "aarch64-linux" for its "platform.cpu" attribute.
64
64
 
65
65
 
66
66
  ### Native Darwin (macOSⓇ) platform releases ("x86_64-darwin" and "arm64-darwin")
@@ -76,7 +76,7 @@ The native Darwin platform release distributes the following dependencies in sou
76
76
  This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x86_64-darwin" or "arm64-darwin" for its "platform.cpu" attribute. Darwin is also known more familiarly as "OSX" or "macOSⓇ" and is the operating system for many AppleⓇ computers.
77
77
 
78
78
 
79
- ### Native WindowsⓇ platform releases ("x86-mingw32" and "x64-mingw32")
79
+ ### Native WindowsⓇ platform releases ("x64-mingw-ucrt")
80
80
 
81
81
  The native WindowsⓇ platform release distributes the following dependencies in source form:
82
82
 
@@ -86,7 +86,7 @@ The native WindowsⓇ platform release distributes the following dependencies in
86
86
  * [zlib](#zlib)
87
87
  * [libiconv](#libiconv)
88
88
 
89
- This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x64-mingw32" or "x86-mingw32" for its "platform.cpu" attribute.
89
+ This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x64-mingw-ucrt" for its "platform.cpu" attribute.
90
90
 
91
91
 
92
92
  ### JavaⓇ (JRuby) platform release ("java")
data/README.md CHANGED
@@ -114,9 +114,13 @@ You can help sponsor the maintainers of this software through one of these organ
114
114
 
115
115
  Requirements:
116
116
 
117
- - Ruby >= 3.0
117
+ - Ruby >= 3.1
118
118
  - JRuby >= 9.4.0.0
119
119
 
120
+ If you are compiling the native extension against a system version of libxml2:
121
+
122
+ - libxml2 >= 2.9.2 (recommended >= 2.12.0)
123
+
120
124
 
121
125
  ### Native Gems: Faster, more reliable installation
122
126
 
@@ -127,11 +131,10 @@ Requirements:
127
131
  Nokogiri ships pre-compiled, "native" gems for the following platforms:
128
132
 
129
133
  - Linux:
130
- - `x86-linux` and `x86_64-linux` (req: `glibc >= 2.17`)
131
- - `aarch64-linux` and `arm-linux` (req: `glibc >= 2.29`)
132
- - Note that musl platforms like Alpine **are** supported
134
+ - `x86_64-linux-gnu`, `aarch64-linux-gnu`, and `arm-linux-gnu` (req: `glibc >= 2.29`)
135
+ - `x86_64-linux-musl`, `aarch64-linux-musl`, and `arm-linux-musl`
133
136
  - Darwin/MacOS: `x86_64-darwin` and `arm64-darwin`
134
- - Windows: `x86-mingw32`, `x64-mingw32`, and `x64-mingw-ucrt`
137
+ - Windows: `x64-mingw-ucrt`
135
138
  - Java: any platform running JRuby 9.4 or higher
136
139
 
137
140
  To determine whether your system supports one of these gems, look at the output of `bundle platform` or `ruby -e 'puts Gem::Platform.local.to_s'`.
data/dependencies.yml CHANGED
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  libxml2:
3
- version: "2.12.9"
4
- sha256: "59912db536ab56a3996489ea0299768c7bcffe57169f0235e7f962a91f483590"
5
- # sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.9.sha256sum
3
+ version: "2.13.5"
4
+ sha256: "74fc163217a3964257d3be39af943e08861263c4231f9ef5b496b6f6d4c7b2b6"
5
+ # sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.5.sha256sum
6
6
 
7
7
  libxslt:
8
- version: "1.1.39"
9
- sha256: "2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0"
10
- # sha-256 hash provided in https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.39.sha256sum
8
+ version: "1.1.42"
9
+ sha256: "85ca62cac0d41fc77d3f6033da9df6fd73d20ea2fc18b0a3609ffb4110e1baeb"
10
+ # sha-256 hash provided in https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.42.sha256sum
11
11
 
12
12
  zlib:
13
13
  version: "1.3.1"