nokogiri 1.12.5 → 1.13.6

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 (103) 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 +64 -44
  7. data/ext/nokogiri/html4_sax_parser_context.c +2 -3
  8. data/ext/nokogiri/xml_document.c +35 -35
  9. data/ext/nokogiri/xml_document_fragment.c +0 -2
  10. data/ext/nokogiri/xml_dtd.c +2 -2
  11. data/ext/nokogiri/xml_encoding_handler.c +25 -11
  12. data/ext/nokogiri/xml_node.c +638 -333
  13. data/ext/nokogiri/xml_reader.c +37 -11
  14. data/ext/nokogiri/xml_sax_parser_context.c +10 -3
  15. data/ext/nokogiri/xml_xpath_context.c +72 -49
  16. data/ext/nokogiri/xslt_stylesheet.c +107 -9
  17. data/gumbo-parser/src/parser.c +0 -11
  18. data/lib/nokogiri/class_resolver.rb +67 -0
  19. data/lib/nokogiri/css/node.rb +9 -8
  20. data/lib/nokogiri/css/parser.rb +360 -341
  21. data/lib/nokogiri/css/parser.y +249 -244
  22. data/lib/nokogiri/css/parser_extras.rb +22 -20
  23. data/lib/nokogiri/css/syntax_error.rb +1 -0
  24. data/lib/nokogiri/css/tokenizer.rb +4 -3
  25. data/lib/nokogiri/css/tokenizer.rex +3 -2
  26. data/lib/nokogiri/css/xpath_visitor.rb +179 -82
  27. data/lib/nokogiri/css.rb +38 -6
  28. data/lib/nokogiri/decorators/slop.rb +8 -7
  29. data/lib/nokogiri/extension.rb +1 -1
  30. data/lib/nokogiri/gumbo.rb +1 -0
  31. data/lib/nokogiri/html.rb +16 -10
  32. data/lib/nokogiri/html4/builder.rb +1 -0
  33. data/lib/nokogiri/html4/document.rb +88 -77
  34. data/lib/nokogiri/html4/document_fragment.rb +11 -7
  35. data/lib/nokogiri/html4/element_description.rb +1 -0
  36. data/lib/nokogiri/html4/element_description_defaults.rb +426 -520
  37. data/lib/nokogiri/html4/entity_lookup.rb +2 -1
  38. data/lib/nokogiri/html4/sax/parser.rb +5 -2
  39. data/lib/nokogiri/html4/sax/parser_context.rb +1 -0
  40. data/lib/nokogiri/html4/sax/push_parser.rb +7 -7
  41. data/lib/nokogiri/html4.rb +11 -5
  42. data/lib/nokogiri/html5/document.rb +27 -10
  43. data/lib/nokogiri/html5/document_fragment.rb +5 -2
  44. data/lib/nokogiri/html5/node.rb +10 -3
  45. data/lib/nokogiri/html5.rb +69 -64
  46. data/lib/nokogiri/jruby/dependencies.rb +10 -9
  47. data/lib/nokogiri/syntax_error.rb +1 -0
  48. data/lib/nokogiri/version/constant.rb +2 -1
  49. data/lib/nokogiri/version/info.rb +20 -13
  50. data/lib/nokogiri/version.rb +1 -0
  51. data/lib/nokogiri/xml/attr.rb +5 -3
  52. data/lib/nokogiri/xml/attribute_decl.rb +2 -1
  53. data/lib/nokogiri/xml/builder.rb +34 -32
  54. data/lib/nokogiri/xml/cdata.rb +2 -1
  55. data/lib/nokogiri/xml/character_data.rb +1 -0
  56. data/lib/nokogiri/xml/document.rb +144 -103
  57. data/lib/nokogiri/xml/document_fragment.rb +41 -38
  58. data/lib/nokogiri/xml/dtd.rb +3 -2
  59. data/lib/nokogiri/xml/element_content.rb +1 -0
  60. data/lib/nokogiri/xml/element_decl.rb +2 -1
  61. data/lib/nokogiri/xml/entity_decl.rb +3 -2
  62. data/lib/nokogiri/xml/entity_reference.rb +1 -0
  63. data/lib/nokogiri/xml/namespace.rb +2 -0
  64. data/lib/nokogiri/xml/node/save_options.rb +8 -4
  65. data/lib/nokogiri/xml/node.rb +521 -351
  66. data/lib/nokogiri/xml/node_set.rb +50 -54
  67. data/lib/nokogiri/xml/notation.rb +12 -0
  68. data/lib/nokogiri/xml/parse_options.rb +12 -7
  69. data/lib/nokogiri/xml/pp/character_data.rb +8 -6
  70. data/lib/nokogiri/xml/pp/node.rb +24 -26
  71. data/lib/nokogiri/xml/pp.rb +1 -0
  72. data/lib/nokogiri/xml/processing_instruction.rb +2 -1
  73. data/lib/nokogiri/xml/reader.rb +17 -19
  74. data/lib/nokogiri/xml/relax_ng.rb +1 -0
  75. data/lib/nokogiri/xml/sax/document.rb +20 -19
  76. data/lib/nokogiri/xml/sax/parser.rb +37 -34
  77. data/lib/nokogiri/xml/sax/parser_context.rb +7 -3
  78. data/lib/nokogiri/xml/sax/push_parser.rb +5 -5
  79. data/lib/nokogiri/xml/sax.rb +1 -0
  80. data/lib/nokogiri/xml/schema.rb +7 -6
  81. data/lib/nokogiri/xml/searchable.rb +93 -62
  82. data/lib/nokogiri/xml/syntax_error.rb +5 -4
  83. data/lib/nokogiri/xml/text.rb +1 -0
  84. data/lib/nokogiri/xml/xpath/syntax_error.rb +2 -1
  85. data/lib/nokogiri/xml/xpath.rb +12 -0
  86. data/lib/nokogiri/xml/xpath_context.rb +2 -3
  87. data/lib/nokogiri/xml.rb +4 -3
  88. data/lib/nokogiri/xslt/stylesheet.rb +1 -0
  89. data/lib/nokogiri/xslt.rb +21 -13
  90. data/lib/nokogiri.rb +19 -16
  91. data/lib/xsd/xmlparser/nokogiri.rb +25 -24
  92. data/patches/libxml2/0004-use-glibc-strlen.patch +3 -3
  93. data/patches/libxml2/0006-update-automake-files-for-arm64.patch +2443 -1914
  94. data/patches/libxml2/0008-htmlParseComment-handle-abruptly-closed-comments.patch +61 -0
  95. data/patches/libxml2/0009-allow-wildcard-namespaces.patch +77 -0
  96. data/patches/libxslt/0001-update-automake-files-for-arm64.patch +2445 -1919
  97. data/ports/archives/libxml2-2.9.14.tar.xz +0 -0
  98. data/ports/archives/libxslt-1.1.35.tar.xz +0 -0
  99. metadata +109 -31
  100. data/patches/libxml2/0007-Fix-XPath-recursion-limit.patch +0 -31
  101. data/patches/libxslt/0002-Fix-xml2-config-check-in-configure-script.patch +0 -19
  102. data/ports/archives/libxml2-2.9.12.tar.gz +0 -0
  103. 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.6
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-05-08 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
@@ -122,88 +122,164 @@ dependencies:
122
122
  version: '13.0'
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: rake-compiler
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - '='
128
+ - !ruby/object:Gem::Version
129
+ version: 1.1.7
130
+ type: :development
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - '='
135
+ - !ruby/object:Gem::Version
136
+ version: 1.1.7
137
+ - !ruby/object:Gem::Dependency
138
+ name: rake-compiler-dock
125
139
  requirement: !ruby/object:Gem::Requirement
126
140
  requirements:
127
141
  - - "~>"
128
142
  - !ruby/object:Gem::Version
129
- version: '1.1'
143
+ version: '1.2'
130
144
  type: :development
131
145
  prerelease: false
132
146
  version_requirements: !ruby/object:Gem::Requirement
133
147
  requirements:
134
148
  - - "~>"
135
149
  - !ruby/object:Gem::Version
136
- version: '1.1'
150
+ version: '1.2'
137
151
  - !ruby/object:Gem::Dependency
138
- name: rake-compiler-dock
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.28'
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: 1.28.2
172
189
  type: :development
173
190
  prerelease: false
174
191
  version_requirements: !ruby/object:Gem::Requirement
175
192
  requirements:
176
193
  - - "~>"
177
194
  - !ruby/object:Gem::Version
178
- version: '1.7'
195
+ version: '1.28'
196
+ - - ">="
197
+ - !ruby/object:Gem::Version
198
+ version: 1.28.2
179
199
  - !ruby/object:Gem::Dependency
180
- name: simplecov
200
+ name: rubocop-minitest
181
201
  requirement: !ruby/object:Gem::Requirement
182
202
  requirements:
183
203
  - - "~>"
184
204
  - !ruby/object:Gem::Version
185
- version: '0.20'
205
+ version: '0.17'
186
206
  type: :development
187
207
  prerelease: false
188
208
  version_requirements: !ruby/object:Gem::Requirement
189
209
  requirements:
190
210
  - - "~>"
191
211
  - !ruby/object:Gem::Version
192
- version: '0.20'
212
+ version: '0.17'
193
213
  - !ruby/object:Gem::Dependency
194
- name: yard
214
+ name: rubocop-performance
215
+ requirement: !ruby/object:Gem::Requirement
216
+ requirements:
217
+ - - "~>"
218
+ - !ruby/object:Gem::Version
219
+ version: '1.12'
220
+ type: :development
221
+ prerelease: false
222
+ version_requirements: !ruby/object:Gem::Requirement
223
+ requirements:
224
+ - - "~>"
225
+ - !ruby/object:Gem::Version
226
+ version: '1.12'
227
+ - !ruby/object:Gem::Dependency
228
+ name: rubocop-rake
229
+ requirement: !ruby/object:Gem::Requirement
230
+ requirements:
231
+ - - "~>"
232
+ - !ruby/object:Gem::Version
233
+ version: '0.6'
234
+ type: :development
235
+ prerelease: false
236
+ version_requirements: !ruby/object:Gem::Requirement
237
+ requirements:
238
+ - - "~>"
239
+ - !ruby/object:Gem::Version
240
+ version: '0.6'
241
+ - !ruby/object:Gem::Dependency
242
+ name: rubocop-shopify
243
+ requirement: !ruby/object:Gem::Requirement
244
+ requirements:
245
+ - - "~>"
246
+ - !ruby/object:Gem::Version
247
+ version: '2.3'
248
+ type: :development
249
+ prerelease: false
250
+ version_requirements: !ruby/object:Gem::Requirement
251
+ requirements:
252
+ - - "~>"
253
+ - !ruby/object:Gem::Version
254
+ version: '2.3'
255
+ - !ruby/object:Gem::Dependency
256
+ name: ruby_memcheck
257
+ requirement: !ruby/object:Gem::Requirement
258
+ requirements:
259
+ - - "~>"
260
+ - !ruby/object:Gem::Version
261
+ version: '1.0'
262
+ type: :development
263
+ prerelease: false
264
+ version_requirements: !ruby/object:Gem::Requirement
265
+ requirements:
266
+ - - "~>"
267
+ - !ruby/object:Gem::Version
268
+ version: '1.0'
269
+ - !ruby/object:Gem::Dependency
270
+ name: simplecov
195
271
  requirement: !ruby/object:Gem::Requirement
196
272
  requirements:
197
273
  - - "~>"
198
274
  - !ruby/object:Gem::Version
199
- version: '0.9'
275
+ version: '0.21'
200
276
  type: :development
201
277
  prerelease: false
202
278
  version_requirements: !ruby/object:Gem::Requirement
203
279
  requirements:
204
280
  - - "~>"
205
281
  - !ruby/object:Gem::Version
206
- version: '0.9'
282
+ version: '0.21'
207
283
  description: |
208
284
  Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby. It provides a
209
285
  sensible, easy-to-understand API for reading, writing, modifying, and querying documents. It is
@@ -341,6 +417,7 @@ files:
341
417
  - gumbo-parser/src/vector.c
342
418
  - gumbo-parser/src/vector.h
343
419
  - lib/nokogiri.rb
420
+ - lib/nokogiri/class_resolver.rb
344
421
  - lib/nokogiri/css.rb
345
422
  - lib/nokogiri/css/node.rb
346
423
  - lib/nokogiri/css/parser.rb
@@ -419,11 +496,11 @@ files:
419
496
  - patches/libxml2/0004-use-glibc-strlen.patch
420
497
  - patches/libxml2/0005-avoid-isnan-isinf.patch
421
498
  - patches/libxml2/0006-update-automake-files-for-arm64.patch
422
- - patches/libxml2/0007-Fix-XPath-recursion-limit.patch
499
+ - patches/libxml2/0008-htmlParseComment-handle-abruptly-closed-comments.patch
500
+ - patches/libxml2/0009-allow-wildcard-namespaces.patch
423
501
  - 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
502
+ - ports/archives/libxml2-2.9.14.tar.xz
503
+ - ports/archives/libxslt-1.1.35.tar.xz
427
504
  homepage: https://nokogiri.org
428
505
  licenses:
429
506
  - MIT
@@ -433,6 +510,7 @@ metadata:
433
510
  documentation_uri: https://nokogiri.org/rdoc/index.html
434
511
  changelog_uri: https://nokogiri.org/CHANGELOG.html
435
512
  source_code_uri: https://github.com/sparklemotion/nokogiri
513
+ rubygems_mfa_required: 'true'
436
514
  post_install_message:
437
515
  rdoc_options:
438
516
  - "--main"
@@ -443,14 +521,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
443
521
  requirements:
444
522
  - - ">="
445
523
  - !ruby/object:Gem::Version
446
- version: 2.5.0
524
+ version: 2.6.0
447
525
  required_rubygems_version: !ruby/object:Gem::Requirement
448
526
  requirements:
449
527
  - - ">="
450
528
  - !ruby/object:Gem::Version
451
529
  version: '0'
452
530
  requirements: []
453
- rubygems_version: 3.2.22
531
+ rubygems_version: 3.3.5
454
532
  signing_key:
455
533
  specification_version: 4
456
534
  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