nokogiri 1.15.5-x86-linux → 1.16.0.rc1-x86-linux

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +11 -14
  3. data/README.md +1 -1
  4. data/dependencies.yml +5 -5
  5. data/ext/nokogiri/extconf.rb +3 -4
  6. data/ext/nokogiri/html4_sax_push_parser.c +1 -1
  7. data/ext/nokogiri/include/libxml2/libxml/HTMLparser.h +23 -0
  8. data/ext/nokogiri/include/libxml2/libxml/SAX.h +0 -2
  9. data/ext/nokogiri/include/libxml2/libxml/SAX2.h +0 -2
  10. data/ext/nokogiri/include/libxml2/libxml/c14n.h +0 -2
  11. data/ext/nokogiri/include/libxml2/libxml/dict.h +1 -0
  12. data/ext/nokogiri/include/libxml2/libxml/encoding.h +16 -14
  13. data/ext/nokogiri/include/libxml2/libxml/entities.h +4 -0
  14. data/ext/nokogiri/include/libxml2/libxml/globals.h +15 -503
  15. data/ext/nokogiri/include/libxml2/libxml/hash.h +57 -61
  16. data/ext/nokogiri/include/libxml2/libxml/nanoftp.h +2 -2
  17. data/ext/nokogiri/include/libxml2/libxml/parser.h +128 -18
  18. data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +1 -0
  19. data/ext/nokogiri/include/libxml2/libxml/relaxng.h +2 -1
  20. data/ext/nokogiri/include/libxml2/libxml/schemasInternals.h +1 -0
  21. data/ext/nokogiri/include/libxml2/libxml/schematron.h +1 -0
  22. data/ext/nokogiri/include/libxml2/libxml/threads.h +4 -11
  23. data/ext/nokogiri/include/libxml2/libxml/tree.h +68 -20
  24. data/ext/nokogiri/include/libxml2/libxml/uri.h +2 -1
  25. data/ext/nokogiri/include/libxml2/libxml/valid.h +2 -0
  26. data/ext/nokogiri/include/libxml2/libxml/xmlIO.h +65 -12
  27. data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +37 -8
  28. data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +37 -40
  29. data/ext/nokogiri/include/libxml2/libxml/xmlreader.h +6 -0
  30. data/ext/nokogiri/include/libxml2/libxml/xmlregexp.h +2 -9
  31. data/ext/nokogiri/include/libxml2/libxml/xmlsave.h +9 -0
  32. data/ext/nokogiri/include/libxml2/libxml/xmlschemas.h +3 -0
  33. data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +28 -43
  34. data/ext/nokogiri/include/libxml2/libxml/xpath.h +1 -1
  35. data/ext/nokogiri/include/libxml2/libxml/xpathInternals.h +2 -1
  36. data/ext/nokogiri/include/libxml2/libxml/xpointer.h +5 -4
  37. data/ext/nokogiri/include/libxslt/xsltconfig.h +1 -1
  38. data/ext/nokogiri/nokogiri.h +10 -3
  39. data/ext/nokogiri/test_global_handlers.c +1 -1
  40. data/ext/nokogiri/xml_cdata.c +1 -2
  41. data/ext/nokogiri/xml_document.c +3 -3
  42. data/ext/nokogiri/xml_namespace.c +0 -4
  43. data/ext/nokogiri/xml_node.c +5 -8
  44. data/ext/nokogiri/xml_reader.c +1 -44
  45. data/ext/nokogiri/xml_relax_ng.c +1 -1
  46. data/ext/nokogiri/xml_sax_push_parser.c +1 -1
  47. data/ext/nokogiri/xml_schema.c +2 -3
  48. data/ext/nokogiri/xml_syntax_error.c +3 -3
  49. data/ext/nokogiri/xml_text.c +1 -2
  50. data/ext/nokogiri/xml_xpath_context.c +2 -5
  51. data/gumbo-parser/Makefile +15 -0
  52. data/lib/nokogiri/3.0/nokogiri.so +0 -0
  53. data/lib/nokogiri/3.1/nokogiri.so +0 -0
  54. data/lib/nokogiri/3.2/nokogiri.so +0 -0
  55. data/lib/nokogiri/3.3/nokogiri.so +0 -0
  56. data/lib/nokogiri/css/parser_extras.rb +1 -1
  57. data/lib/nokogiri/css/xpath_visitor.rb +1 -21
  58. data/lib/nokogiri/html4/document.rb +1 -1
  59. data/lib/nokogiri/html4/encoding_reader.rb +1 -1
  60. data/lib/nokogiri/html5.rb +0 -66
  61. data/lib/nokogiri/version/constant.rb +1 -1
  62. data/lib/nokogiri/version/info.rb +6 -5
  63. data/lib/nokogiri/xml/attr.rb +2 -2
  64. data/lib/nokogiri/xml/document.rb +3 -3
  65. data/lib/nokogiri/xml/document_fragment.rb +2 -2
  66. data/lib/nokogiri/xml/namespace.rb +1 -2
  67. data/lib/nokogiri/xml/node.rb +6 -5
  68. data/lib/nokogiri/xml/node_set.rb +3 -3
  69. data/lib/nokogiri/xml/searchable.rb +3 -3
  70. data/lib/nokogiri/xml/syntax_error.rb +1 -1
  71. data/lib/nokogiri/xml.rb +1 -1
  72. data/lib/nokogiri/xslt.rb +1 -1
  73. data/lib/nokogiri.rb +1 -1
  74. metadata +7 -7
  75. data/lib/nokogiri/2.7/nokogiri.so +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41306819f0a24daeab220d6dcf90e58b0e6b4cdb48264ec0c8727a703112a9c6
4
- data.tar.gz: c13fe4ba8ecbf59f6fe8bd9a94cb50bb1e1af839bdf9b4d72ef5731223582b1c
3
+ metadata.gz: d9a2b0792bdf7eded1f99738eacd248e0c7abf39d5a6ecdf413ef84c57e56f91
4
+ data.tar.gz: 410b7d089b642207f26038b805702f4a39ff46c7f92dc0886b93bf7ac125c82a
5
5
  SHA512:
6
- metadata.gz: 59121eb70690e3d117a74265eaef829f6fc01fb7d0e03e44873bc82b2a48ab346b79b8bfd076c1a2f18b21f36c6cb2f7671aa6f4aad710f57728060bde569e2f
7
- data.tar.gz: 3032b938707d4fa4853677b50dee1dedf46e08eadd9f2178157277a0453ee530f1d6306f74f84efa30e5b5f42e30e03a7643c56f8bb45b560b979ab04b1c231e
6
+ metadata.gz: cbc0af248c99c4e6e8c3f3893168c7f2b7677f39119e6a1e02f0f8250ead90e59d5021dfc3e16b753563feead2baed5a904a0b19087816540867e8990d7935a1
7
+ data.tar.gz: 1a9e122b86c9bd10c16da70d6cfb14aabdf8770c32b489cea616f18d96d8817888c7a335f33b5e58af0aaaa41ac86ea6a8222b263f76828ac309e47369d63089
data/Gemfile CHANGED
@@ -7,33 +7,30 @@ gemspec
7
7
  group :development do
8
8
  # bootstrapping
9
9
  gem "bundler", "~> 2.3"
10
- gem "rake", "= 13.0.6"
10
+ gem "rake", "13.1.0"
11
11
 
12
12
  # building extensions
13
- gem "rake-compiler", "= 1.2.1"
14
- gem "rake-compiler-dock", "= 1.3.0"
15
-
16
- # documentation
17
- gem "hoe-markdown", "= 1.4.0"
13
+ gem "rake-compiler", "1.2.5"
14
+ gem "rake-compiler-dock", "1.4.0.rc2"
18
15
 
19
16
  # parser generator
20
17
  gem "rexical", "= 1.0.7"
21
18
 
22
19
  # tests
23
- gem "minitest", "5.18.0"
24
- gem "minitest-reporters", "1.6.0"
25
- gem "ruby_memcheck", "1.3.2"
20
+ gem "minitest", "5.20.0"
21
+ gem "minitest-parallel_fork", "2.0.0"
22
+ gem "ruby_memcheck", "2.2.1"
26
23
  gem "rubyzip", "~> 2.3.2"
27
24
  gem "simplecov", "= 0.21.2"
28
25
 
29
26
  # rubocop
30
27
  if Gem::Requirement.new("~> 3.0").satisfied_by?(Gem::Version.new(RUBY_VERSION))
31
- gem "rubocop", "1.51.0"
32
- gem "rubocop-minitest", "0.31.0"
28
+ gem "rubocop", "1.58.0"
29
+ gem "rubocop-minitest", "0.33.0"
33
30
  gem "rubocop-packaging", "0.5.2"
34
- gem "rubocop-performance", "1.18.0"
31
+ gem "rubocop-performance", "1.19.1"
35
32
  gem "rubocop-rake", "= 0.6.0"
36
- gem "rubocop-shopify", "2.13.0"
33
+ gem "rubocop-shopify", "2.14.0"
37
34
  end
38
35
  end
39
36
 
@@ -41,5 +38,5 @@ end
41
38
  # `bundle config set --local without rdoc`
42
39
  # Then re-run `bundle install`.
43
40
  group :rdoc do
44
- gem "rdoc", "6.5.0"
41
+ gem "rdoc", "6.6.1"
45
42
  end
data/README.md CHANGED
@@ -111,7 +111,7 @@ You can help sponsor the maintainers of this software through one of these organ
111
111
 
112
112
  Requirements:
113
113
 
114
- - Ruby >= 2.7
114
+ - Ruby >= 3.0
115
115
  - JRuby >= 9.4.0.0
116
116
 
117
117
 
data/dependencies.yml CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
  libxml2:
3
- version: "2.11.6"
4
- sha256: "c90eee7506764abbe07bb616b82da452529609815aefef423d66ef080eb0c300"
5
- # sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.6.sha256sum
3
+ version: "2.12.3"
4
+ sha256: "8c8f1092340a89ff32bc44ad5c9693aff9bc8a7a3e161bb239666e5d15ac9aaa"
5
+ # sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.3.sha256sum
6
6
 
7
7
  libxslt:
8
8
  version: "1.1.39"
@@ -10,8 +10,8 @@ libxslt:
10
10
  # sha-256 hash provided in https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.39.sha256sum
11
11
 
12
12
  zlib:
13
- version: "1.2.13"
14
- sha256: "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30"
13
+ version: "1.3"
14
+ sha256: "ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e"
15
15
  # SHA-256 hash provided on http://zlib.net/
16
16
 
17
17
  libiconv:
@@ -443,7 +443,7 @@ def process_recipe(name, version, static_p, cross_p, cacheable_p = true)
443
443
  # We use 'host' to set compiler prefix for cross-compiling. Prefer host_alias over host. And
444
444
  # prefer i686 (what external dev tools use) to i386 (what ruby's configure.ac emits).
445
445
  recipe.host = RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"]
446
- recipe.host = recipe.host.gsub(/i386/, "i686")
446
+ recipe.host = recipe.host.gsub("i386", "i686")
447
447
 
448
448
  recipe.target = File.join(PACKAGE_ROOT_DIR, "ports") if cacheable_p
449
449
  recipe.configure_options << "--libdir=#{File.join(recipe.path, "lib")}"
@@ -651,8 +651,7 @@ append_cppflags(ENV["CPPFLAGS"].split) unless ENV["CPPFLAGS"].nil?
651
651
  append_ldflags(ENV["LDFLAGS"].split) unless ENV["LDFLAGS"].nil?
652
652
  $LIBS = concat_flags($LIBS, ENV["LIBS"])
653
653
 
654
- # nokogumbo code uses C90/C99 features, let's make sure older compilers won't give
655
- # errors/warnings. see #2302
654
+ # libgumbo uses C90/C99 features, see #2302
656
655
  append_cflags(["-std=c99", "-Wno-declaration-after-statement"])
657
656
 
658
657
  # gumbo html5 serialization is slower with O3, let's make sure we use O2
@@ -919,6 +918,7 @@ else
919
918
  "--with-c14n",
920
919
  "--with-debug",
921
920
  "--with-threads",
921
+ "--without-tls", # see https://github.com/sparklemotion/nokogiri/issues/3031
922
922
  "CPPFLAGS=#{cppflags}",
923
923
  "CFLAGS=#{cflags}",
924
924
  ]
@@ -1087,7 +1087,6 @@ have_func("xmlRelaxNGSetParserStructuredErrors") # introduced in libxml 2.6.24
1087
1087
  have_func("xmlRelaxNGSetValidStructuredErrors") # introduced in libxml 2.6.21
1088
1088
  have_func("xmlSchemaSetValidStructuredErrors") # introduced in libxml 2.6.23
1089
1089
  have_func("xmlSchemaSetParserStructuredErrors") # introduced in libxml 2.6.23
1090
- have_func("rb_gc_location") # introduced in Ruby 2.7
1091
1090
  have_func("rb_category_warning") # introduced in Ruby 3.0
1092
1091
 
1093
1092
  other_library_versions_string = OTHER_LIBRARY_VERSIONS.map { |k, v| [k, v].join(":") }.join(",")
@@ -32,7 +32,7 @@ native_write(VALUE self, VALUE _chunk, VALUE _last_chunk)
32
32
 
33
33
  if ((status != 0) && !(ctx->options & XML_PARSE_RECOVER)) {
34
34
  // TODO: there appear to be no tests for this block
35
- xmlErrorPtr e = xmlCtxtGetLastError(ctx);
35
+ xmlErrorConstPtr e = xmlCtxtGetLastError(ctx);
36
36
  Nokogiri_error_raise(NULL, e);
37
37
  }
38
38
 
@@ -80,6 +80,23 @@ struct _htmlEntityDesc {
80
80
  const char *desc; /* the description */
81
81
  };
82
82
 
83
+ /** DOC_DISABLE */
84
+ #ifdef LIBXML_SAX1_ENABLED
85
+ #define XML_GLOBALS_HTML \
86
+ XML_OP(htmlDefaultSAXHandler, xmlSAXHandlerV1, XML_DEPRECATED)
87
+ #else
88
+ #define XML_GLOBALS_HTML
89
+ #endif
90
+
91
+ #define XML_OP XML_DECLARE_GLOBAL
92
+ XML_GLOBALS_HTML
93
+ #undef XML_OP
94
+
95
+ #if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
96
+ #define htmlDefaultSAXHandler XML_GLOBAL_MACRO(htmlDefaultSAXHandler)
97
+ #endif
98
+ /** DOC_ENABLE */
99
+
83
100
  /*
84
101
  * There is only few public functions.
85
102
  */
@@ -316,5 +333,11 @@ XMLPUBFUN htmlStatus htmlNodeStatus(const htmlNodePtr, int) ;
316
333
  }
317
334
  #endif
318
335
 
336
+ #else /* LIBXML_HTML_ENABLED */
337
+
338
+ /** DOC_DISABLE */
339
+ #define XML_GLOBALS_HTML
340
+ /** DOC_ENABLE */
341
+
319
342
  #endif /* LIBXML_HTML_ENABLED */
320
343
  #endif /* __HTML_PARSER_H__ */
@@ -12,8 +12,6 @@
12
12
  #ifndef __XML_SAX_H__
13
13
  #define __XML_SAX_H__
14
14
 
15
- #include <stdio.h>
16
- #include <stdlib.h>
17
15
  #include <libxml/xmlversion.h>
18
16
  #include <libxml/parser.h>
19
17
 
@@ -12,8 +12,6 @@
12
12
  #ifndef __XML_SAX2_H__
13
13
  #define __XML_SAX2_H__
14
14
 
15
- #include <stdio.h>
16
- #include <stdlib.h>
17
15
  #include <libxml/xmlversion.h>
18
16
  #include <libxml/parser.h>
19
17
 
@@ -20,7 +20,6 @@
20
20
  #include <libxml/xmlversion.h>
21
21
 
22
22
  #ifdef LIBXML_C14N_ENABLED
23
- #ifdef LIBXML_OUTPUT_ENABLED
24
23
 
25
24
  #include <libxml/tree.h>
26
25
  #include <libxml/xpath.h>
@@ -122,7 +121,6 @@ XMLPUBFUN int
122
121
  }
123
122
  #endif /* __cplusplus */
124
123
 
125
- #endif /* LIBXML_OUTPUT_ENABLED */
126
124
  #endif /* LIBXML_C14N_ENABLED */
127
125
  #endif /* __XML_C14N_H__ */
128
126
 
@@ -13,6 +13,7 @@
13
13
 
14
14
  #include <stddef.h>
15
15
  #include <libxml/xmlversion.h>
16
+ #include <libxml/xmlstring.h>
16
17
 
17
18
  #ifdef __cplusplus
18
19
  extern "C" {
@@ -32,6 +32,15 @@
32
32
  extern "C" {
33
33
  #endif
34
34
 
35
+ typedef enum {
36
+ XML_ENC_ERR_SUCCESS = 0,
37
+ XML_ENC_ERR_SPACE = -1,
38
+ XML_ENC_ERR_INPUT = -2,
39
+ XML_ENC_ERR_PARTIAL = -3,
40
+ XML_ENC_ERR_INTERNAL = -4,
41
+ XML_ENC_ERR_MEMORY = -5
42
+ } xmlCharEncError;
43
+
35
44
  /*
36
45
  * xmlCharEncoding:
37
46
  *
@@ -142,14 +151,6 @@ struct _xmlCharEncodingHandler {
142
151
  #endif /* LIBXML_ICU_ENABLED */
143
152
  };
144
153
 
145
- #ifdef __cplusplus
146
- }
147
- #endif
148
- #include <libxml/tree.h>
149
- #ifdef __cplusplus
150
- extern "C" {
151
- #endif
152
-
153
154
  /*
154
155
  * Interfaces for encoding handlers.
155
156
  */
@@ -194,20 +195,21 @@ XMLPUBFUN xmlCharEncoding
194
195
  xmlDetectCharEncoding (const unsigned char *in,
195
196
  int len);
196
197
 
198
+ struct _xmlBuffer;
197
199
  XMLPUBFUN int
198
200
  xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
199
- xmlBufferPtr out,
200
- xmlBufferPtr in);
201
+ struct _xmlBuffer *out,
202
+ struct _xmlBuffer *in);
201
203
 
202
204
  XMLPUBFUN int
203
205
  xmlCharEncInFunc (xmlCharEncodingHandler *handler,
204
- xmlBufferPtr out,
205
- xmlBufferPtr in);
206
+ struct _xmlBuffer *out,
207
+ struct _xmlBuffer *in);
206
208
  XML_DEPRECATED
207
209
  XMLPUBFUN int
208
210
  xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
209
- xmlBufferPtr out,
210
- xmlBufferPtr in);
211
+ struct _xmlBuffer *out,
212
+ struct _xmlBuffer *in);
211
213
  XMLPUBFUN int
212
214
  xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
213
215
 
@@ -12,7 +12,9 @@
12
12
  #define __XML_ENTITIES_H__
13
13
 
14
14
  #include <libxml/xmlversion.h>
15
+ #define XML_TREE_INTERNALS
15
16
  #include <libxml/tree.h>
17
+ #undef XML_TREE_INTERNALS
16
18
 
17
19
  #ifdef __cplusplus
18
20
  extern "C" {
@@ -85,6 +87,8 @@ XMLPUBFUN xmlEntityPtr
85
87
  const xmlChar *ExternalID,
86
88
  const xmlChar *SystemID,
87
89
  const xmlChar *content);
90
+ XMLPUBFUN void
91
+ xmlFreeEntity (xmlEntityPtr entity);
88
92
  XMLPUBFUN xmlEntityPtr
89
93
  xmlAddDocEntity (xmlDocPtr doc,
90
94
  const xmlChar *name,