nokogiri 1.12.5 → 1.13.8

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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -0
  3. data/README.md +9 -7
  4. data/bin/nokogiri +63 -50
  5. data/dependencies.yml +13 -64
  6. data/ext/nokogiri/extconf.rb +66 -44
  7. data/ext/nokogiri/gumbo.c +1 -1
  8. data/ext/nokogiri/html4_sax_parser_context.c +2 -3
  9. data/ext/nokogiri/nokogiri.h +8 -0
  10. data/ext/nokogiri/xml_attr.c +2 -2
  11. data/ext/nokogiri/xml_attribute_decl.c +3 -3
  12. data/ext/nokogiri/xml_cdata.c +1 -1
  13. data/ext/nokogiri/xml_document.c +36 -36
  14. data/ext/nokogiri/xml_document_fragment.c +0 -2
  15. data/ext/nokogiri/xml_dtd.c +10 -10
  16. data/ext/nokogiri/xml_element_decl.c +3 -3
  17. data/ext/nokogiri/xml_encoding_handler.c +25 -11
  18. data/ext/nokogiri/xml_entity_decl.c +5 -5
  19. data/ext/nokogiri/xml_node.c +707 -381
  20. data/ext/nokogiri/xml_node_set.c +4 -4
  21. data/ext/nokogiri/xml_reader.c +88 -11
  22. data/ext/nokogiri/xml_sax_parser_context.c +10 -3
  23. data/ext/nokogiri/xml_schema.c +3 -3
  24. data/ext/nokogiri/xml_text.c +1 -1
  25. data/ext/nokogiri/xml_xpath_context.c +73 -50
  26. data/ext/nokogiri/xslt_stylesheet.c +107 -9
  27. data/gumbo-parser/src/parser.c +0 -11
  28. data/lib/nokogiri/class_resolver.rb +67 -0
  29. data/lib/nokogiri/css/node.rb +9 -8
  30. data/lib/nokogiri/css/parser.rb +360 -341
  31. data/lib/nokogiri/css/parser.y +249 -244
  32. data/lib/nokogiri/css/parser_extras.rb +22 -20
  33. data/lib/nokogiri/css/syntax_error.rb +1 -0
  34. data/lib/nokogiri/css/tokenizer.rb +4 -3
  35. data/lib/nokogiri/css/tokenizer.rex +3 -2
  36. data/lib/nokogiri/css/xpath_visitor.rb +179 -82
  37. data/lib/nokogiri/css.rb +38 -6
  38. data/lib/nokogiri/decorators/slop.rb +8 -7
  39. data/lib/nokogiri/extension.rb +1 -1
  40. data/lib/nokogiri/gumbo.rb +1 -0
  41. data/lib/nokogiri/html.rb +16 -10
  42. data/lib/nokogiri/html4/builder.rb +1 -0
  43. data/lib/nokogiri/html4/document.rb +88 -77
  44. data/lib/nokogiri/html4/document_fragment.rb +11 -7
  45. data/lib/nokogiri/html4/element_description.rb +1 -0
  46. data/lib/nokogiri/html4/element_description_defaults.rb +426 -520
  47. data/lib/nokogiri/html4/entity_lookup.rb +2 -1
  48. data/lib/nokogiri/html4/sax/parser.rb +5 -2
  49. data/lib/nokogiri/html4/sax/parser_context.rb +1 -0
  50. data/lib/nokogiri/html4/sax/push_parser.rb +7 -7
  51. data/lib/nokogiri/html4.rb +11 -5
  52. data/lib/nokogiri/html5/document.rb +27 -10
  53. data/lib/nokogiri/html5/document_fragment.rb +5 -2
  54. data/lib/nokogiri/html5/node.rb +10 -3
  55. data/lib/nokogiri/html5.rb +69 -64
  56. data/lib/nokogiri/jruby/dependencies.rb +10 -9
  57. data/lib/nokogiri/syntax_error.rb +1 -0
  58. data/lib/nokogiri/version/constant.rb +2 -1
  59. data/lib/nokogiri/version/info.rb +20 -13
  60. data/lib/nokogiri/version.rb +1 -0
  61. data/lib/nokogiri/xml/attr.rb +5 -3
  62. data/lib/nokogiri/xml/attribute_decl.rb +2 -1
  63. data/lib/nokogiri/xml/builder.rb +34 -32
  64. data/lib/nokogiri/xml/cdata.rb +2 -1
  65. data/lib/nokogiri/xml/character_data.rb +1 -0
  66. data/lib/nokogiri/xml/document.rb +144 -103
  67. data/lib/nokogiri/xml/document_fragment.rb +41 -38
  68. data/lib/nokogiri/xml/dtd.rb +3 -2
  69. data/lib/nokogiri/xml/element_content.rb +1 -0
  70. data/lib/nokogiri/xml/element_decl.rb +2 -1
  71. data/lib/nokogiri/xml/entity_decl.rb +3 -2
  72. data/lib/nokogiri/xml/entity_reference.rb +1 -0
  73. data/lib/nokogiri/xml/namespace.rb +2 -0
  74. data/lib/nokogiri/xml/node/save_options.rb +8 -4
  75. data/lib/nokogiri/xml/node.rb +521 -351
  76. data/lib/nokogiri/xml/node_set.rb +50 -54
  77. data/lib/nokogiri/xml/notation.rb +12 -0
  78. data/lib/nokogiri/xml/parse_options.rb +12 -7
  79. data/lib/nokogiri/xml/pp/character_data.rb +8 -6
  80. data/lib/nokogiri/xml/pp/node.rb +24 -26
  81. data/lib/nokogiri/xml/pp.rb +1 -0
  82. data/lib/nokogiri/xml/processing_instruction.rb +2 -1
  83. data/lib/nokogiri/xml/reader.rb +20 -24
  84. data/lib/nokogiri/xml/relax_ng.rb +1 -0
  85. data/lib/nokogiri/xml/sax/document.rb +20 -19
  86. data/lib/nokogiri/xml/sax/parser.rb +37 -34
  87. data/lib/nokogiri/xml/sax/parser_context.rb +7 -3
  88. data/lib/nokogiri/xml/sax/push_parser.rb +5 -5
  89. data/lib/nokogiri/xml/sax.rb +1 -0
  90. data/lib/nokogiri/xml/schema.rb +7 -6
  91. data/lib/nokogiri/xml/searchable.rb +93 -62
  92. data/lib/nokogiri/xml/syntax_error.rb +5 -4
  93. data/lib/nokogiri/xml/text.rb +1 -0
  94. data/lib/nokogiri/xml/xpath/syntax_error.rb +2 -1
  95. data/lib/nokogiri/xml/xpath.rb +12 -0
  96. data/lib/nokogiri/xml/xpath_context.rb +2 -3
  97. data/lib/nokogiri/xml.rb +4 -3
  98. data/lib/nokogiri/xslt/stylesheet.rb +1 -0
  99. data/lib/nokogiri/xslt.rb +21 -13
  100. data/lib/nokogiri.rb +19 -16
  101. data/lib/xsd/xmlparser/nokogiri.rb +25 -24
  102. data/patches/libxml2/0004-use-glibc-strlen.patch +3 -3
  103. data/patches/libxml2/0006-update-automake-files-for-arm64.patch +2443 -1914
  104. data/patches/libxml2/0008-htmlParseComment-handle-abruptly-closed-comments.patch +61 -0
  105. data/patches/libxml2/0009-allow-wildcard-namespaces.patch +77 -0
  106. data/patches/libxslt/0001-update-automake-files-for-arm64.patch +2445 -1919
  107. data/ports/archives/libxml2-2.9.14.tar.xz +0 -0
  108. data/ports/archives/libxslt-1.1.35.tar.xz +0 -0
  109. metadata +104 -32
  110. data/patches/libxml2/0007-Fix-XPath-recursion-limit.patch +0 -31
  111. data/patches/libxslt/0002-Fix-xml2-config-check-in-configure-script.patch +0 -19
  112. data/ports/archives/libxml2-2.9.12.tar.gz +0 -0
  113. data/ports/archives/libxslt-1.1.34.tar.gz +0 -0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.5
4
+ version: 1.13.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Dalessio
@@ -20,36 +20,36 @@ authors:
20
20
  autorequire:
21
21
  bindir: bin
22
22
  cert_chain: []
23
- date: 2021-09-27 00:00:00.000000000 Z
23
+ date: 2022-07-23 00:00:00.000000000 Z
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
- name: racc
26
+ name: mini_portile2
27
27
  requirement: !ruby/object:Gem::Requirement
28
28
  requirements:
29
29
  - - "~>"
30
30
  - !ruby/object:Gem::Version
31
- version: '1.4'
31
+ version: 2.8.0
32
32
  type: :runtime
33
33
  prerelease: false
34
34
  version_requirements: !ruby/object:Gem::Requirement
35
35
  requirements:
36
36
  - - "~>"
37
37
  - !ruby/object:Gem::Version
38
- version: '1.4'
38
+ version: 2.8.0
39
39
  - !ruby/object:Gem::Dependency
40
- name: mini_portile2
40
+ name: racc
41
41
  requirement: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - "~>"
44
44
  - !ruby/object:Gem::Version
45
- version: 2.6.1
45
+ version: '1.4'
46
46
  type: :runtime
47
47
  prerelease: false
48
48
  version_requirements: !ruby/object:Gem::Requirement
49
49
  requirements:
50
50
  - - "~>"
51
51
  - !ruby/object:Gem::Version
52
- version: 2.6.1
52
+ version: '1.4'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: bundler
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -84,14 +84,14 @@ dependencies:
84
84
  requirements:
85
85
  - - "~>"
86
86
  - !ruby/object:Gem::Version
87
- version: '5.8'
87
+ version: '5.15'
88
88
  type: :development
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - "~>"
93
93
  - !ruby/object:Gem::Version
94
- version: '5.8'
94
+ version: '5.15'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: minitest-reporters
97
97
  requirement: !ruby/object:Gem::Requirement
@@ -124,86 +124,156 @@ dependencies:
124
124
  name: rake-compiler
125
125
  requirement: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - "~>"
127
+ - - '='
128
128
  - !ruby/object:Gem::Version
129
- version: '1.1'
129
+ version: 1.1.7
130
130
  type: :development
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - "~>"
134
+ - - '='
135
135
  - !ruby/object:Gem::Version
136
- version: '1.1'
136
+ version: 1.1.7
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: rake-compiler-dock
139
+ requirement: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - '='
142
+ - !ruby/object:Gem::Version
143
+ version: 1.2.2
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - '='
149
+ - !ruby/object:Gem::Version
150
+ version: 1.2.2
151
+ - !ruby/object:Gem::Dependency
152
+ name: rdoc
139
153
  requirement: !ruby/object:Gem::Requirement
140
154
  requirements:
141
155
  - - "~>"
142
156
  - !ruby/object:Gem::Version
143
- version: '1.1'
157
+ version: '6.3'
144
158
  type: :development
145
159
  prerelease: false
146
160
  version_requirements: !ruby/object:Gem::Requirement
147
161
  requirements:
148
162
  - - "~>"
149
163
  - !ruby/object:Gem::Version
150
- version: '1.1'
164
+ version: '6.3'
151
165
  - !ruby/object:Gem::Dependency
152
166
  name: rexical
153
167
  requirement: !ruby/object:Gem::Requirement
154
168
  requirements:
155
169
  - - "~>"
156
170
  - !ruby/object:Gem::Version
157
- version: 1.0.5
171
+ version: 1.0.7
158
172
  type: :development
159
173
  prerelease: false
160
174
  version_requirements: !ruby/object:Gem::Requirement
161
175
  requirements:
162
176
  - - "~>"
163
177
  - !ruby/object:Gem::Version
164
- version: 1.0.5
178
+ version: 1.0.7
165
179
  - !ruby/object:Gem::Dependency
166
180
  name: rubocop
167
181
  requirement: !ruby/object:Gem::Requirement
168
182
  requirements:
169
183
  - - "~>"
170
184
  - !ruby/object:Gem::Version
171
- version: '1.7'
185
+ version: 1.30.1
172
186
  type: :development
173
187
  prerelease: false
174
188
  version_requirements: !ruby/object:Gem::Requirement
175
189
  requirements:
176
190
  - - "~>"
177
191
  - !ruby/object:Gem::Version
178
- version: '1.7'
192
+ version: 1.30.1
179
193
  - !ruby/object:Gem::Dependency
180
- name: simplecov
194
+ name: rubocop-minitest
195
+ requirement: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - "~>"
198
+ - !ruby/object:Gem::Version
199
+ version: '0.17'
200
+ type: :development
201
+ prerelease: false
202
+ version_requirements: !ruby/object:Gem::Requirement
203
+ requirements:
204
+ - - "~>"
205
+ - !ruby/object:Gem::Version
206
+ version: '0.17'
207
+ - !ruby/object:Gem::Dependency
208
+ name: rubocop-performance
181
209
  requirement: !ruby/object:Gem::Requirement
182
210
  requirements:
183
211
  - - "~>"
184
212
  - !ruby/object:Gem::Version
185
- version: '0.20'
213
+ version: '1.12'
186
214
  type: :development
187
215
  prerelease: false
188
216
  version_requirements: !ruby/object:Gem::Requirement
189
217
  requirements:
190
218
  - - "~>"
191
219
  - !ruby/object:Gem::Version
192
- version: '0.20'
220
+ version: '1.12'
193
221
  - !ruby/object:Gem::Dependency
194
- name: yard
222
+ name: rubocop-rake
223
+ requirement: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - "~>"
226
+ - !ruby/object:Gem::Version
227
+ version: '0.6'
228
+ type: :development
229
+ prerelease: false
230
+ version_requirements: !ruby/object:Gem::Requirement
231
+ requirements:
232
+ - - "~>"
233
+ - !ruby/object:Gem::Version
234
+ version: '0.6'
235
+ - !ruby/object:Gem::Dependency
236
+ name: rubocop-shopify
237
+ requirement: !ruby/object:Gem::Requirement
238
+ requirements:
239
+ - - '='
240
+ - !ruby/object:Gem::Version
241
+ version: 2.5.0
242
+ type: :development
243
+ prerelease: false
244
+ version_requirements: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - '='
247
+ - !ruby/object:Gem::Version
248
+ version: 2.5.0
249
+ - !ruby/object:Gem::Dependency
250
+ name: ruby_memcheck
251
+ requirement: !ruby/object:Gem::Requirement
252
+ requirements:
253
+ - - "~>"
254
+ - !ruby/object:Gem::Version
255
+ version: '1.0'
256
+ type: :development
257
+ prerelease: false
258
+ version_requirements: !ruby/object:Gem::Requirement
259
+ requirements:
260
+ - - "~>"
261
+ - !ruby/object:Gem::Version
262
+ version: '1.0'
263
+ - !ruby/object:Gem::Dependency
264
+ name: simplecov
195
265
  requirement: !ruby/object:Gem::Requirement
196
266
  requirements:
197
267
  - - "~>"
198
268
  - !ruby/object:Gem::Version
199
- version: '0.9'
269
+ version: '0.21'
200
270
  type: :development
201
271
  prerelease: false
202
272
  version_requirements: !ruby/object:Gem::Requirement
203
273
  requirements:
204
274
  - - "~>"
205
275
  - !ruby/object:Gem::Version
206
- version: '0.9'
276
+ version: '0.21'
207
277
  description: |
208
278
  Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby. It provides a
209
279
  sensible, easy-to-understand API for reading, writing, modifying, and querying documents. It is
@@ -341,6 +411,7 @@ files:
341
411
  - gumbo-parser/src/vector.c
342
412
  - gumbo-parser/src/vector.h
343
413
  - lib/nokogiri.rb
414
+ - lib/nokogiri/class_resolver.rb
344
415
  - lib/nokogiri/css.rb
345
416
  - lib/nokogiri/css/node.rb
346
417
  - lib/nokogiri/css/parser.rb
@@ -419,11 +490,11 @@ files:
419
490
  - patches/libxml2/0004-use-glibc-strlen.patch
420
491
  - patches/libxml2/0005-avoid-isnan-isinf.patch
421
492
  - patches/libxml2/0006-update-automake-files-for-arm64.patch
422
- - patches/libxml2/0007-Fix-XPath-recursion-limit.patch
493
+ - patches/libxml2/0008-htmlParseComment-handle-abruptly-closed-comments.patch
494
+ - patches/libxml2/0009-allow-wildcard-namespaces.patch
423
495
  - patches/libxslt/0001-update-automake-files-for-arm64.patch
424
- - patches/libxslt/0002-Fix-xml2-config-check-in-configure-script.patch
425
- - ports/archives/libxml2-2.9.12.tar.gz
426
- - ports/archives/libxslt-1.1.34.tar.gz
496
+ - ports/archives/libxml2-2.9.14.tar.xz
497
+ - ports/archives/libxslt-1.1.35.tar.xz
427
498
  homepage: https://nokogiri.org
428
499
  licenses:
429
500
  - MIT
@@ -433,6 +504,7 @@ metadata:
433
504
  documentation_uri: https://nokogiri.org/rdoc/index.html
434
505
  changelog_uri: https://nokogiri.org/CHANGELOG.html
435
506
  source_code_uri: https://github.com/sparklemotion/nokogiri
507
+ rubygems_mfa_required: 'true'
436
508
  post_install_message:
437
509
  rdoc_options:
438
510
  - "--main"
@@ -443,14 +515,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
443
515
  requirements:
444
516
  - - ">="
445
517
  - !ruby/object:Gem::Version
446
- version: 2.5.0
518
+ version: 2.6.0
447
519
  required_rubygems_version: !ruby/object:Gem::Requirement
448
520
  requirements:
449
521
  - - ">="
450
522
  - !ruby/object:Gem::Version
451
523
  version: '0'
452
524
  requirements: []
453
- rubygems_version: 3.2.22
525
+ rubygems_version: 3.3.7
454
526
  signing_key:
455
527
  specification_version: 4
456
528
  summary: Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
@@ -1,31 +0,0 @@
1
- From 3e1aad4fe584747fd7d17cc7b2863a78e2d21a77 Mon Sep 17 00:00:00 2001
2
- From: Nick Wellnhofer <wellnhofer@aevum.de>
3
- Date: Wed, 2 Jun 2021 17:31:49 +0200
4
- Subject: [PATCH] Fix XPath recursion limit
5
-
6
- Fix accounting of recursion depth when parsing XPath expressions.
7
-
8
- This silly bug introduced in commit 804c5297 could lead to spurious
9
- errors when parsing larger expressions or XSLT documents.
10
-
11
- Should fix #264.
12
- ---
13
- xpath.c | 2 +-
14
- 1 file changed, 1 insertion(+), 1 deletion(-)
15
-
16
- diff --git a/xpath.c b/xpath.c
17
- index 7497ba0..1aa2f1a 100644
18
- --- a/xpath.c
19
- +++ b/xpath.c
20
- @@ -10983,7 +10983,7 @@ xmlXPathCompileExpr(xmlXPathParserContextPtr ctxt, int sort) {
21
- }
22
-
23
- if (xpctxt != NULL)
24
- - xpctxt->depth -= 1;
25
- + xpctxt->depth -= 10;
26
- }
27
-
28
- /**
29
- --
30
- 2.31.0
31
-
@@ -1,19 +0,0 @@
1
- From: Nick Wellnhofer <wellnhofer@aevum.de>
2
- Date: Fri, 15 Nov 2019 11:53:11 +0100
3
- Subject: [PATCH] Fix xml2-config check in configure script
4
-
5
- A 'print' option has never been supported. After a recent change to
6
- libxml2, invalid options cause xml2-config to fail.
7
- diff --git a/configure b/configure
8
- index c63adc5..6061227 100755
9
- --- a/configure
10
- +++ b/configure
11
- @@ -14860,7 +14860,7 @@ PKG_CONFIG=$_save_PKG_CONFIG
12
- fi
13
-
14
-
15
- -if test "x$LIBXML_LIBS" = "x" && ${XML_CONFIG} --libs print > /dev/null 2>&1
16
- +if test "x$LIBXML_LIBS" = "x" && ${XML_CONFIG} --libs > /dev/null 2>&1
17
- then
18
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml libraries >= $LIBXML_REQUIRED_VERSION" >&5
19
- $as_echo_n "checking for libxml libraries >= $LIBXML_REQUIRED_VERSION... " >&6; }
Binary file
Binary file