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
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Nokogiri
3
4
  module XML
4
5
  class Namespace
@@ -6,6 +7,7 @@ module Nokogiri
6
7
  attr_reader :document
7
8
 
8
9
  private
10
+
9
11
  def inspect_attributes
10
12
  [:prefix, :href]
11
13
  end
@@ -1,9 +1,11 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Nokogiri
3
4
  module XML
4
5
  class Node
5
6
  ###
6
- # Save options for serializing nodes
7
+ # Save options for serializing nodes.
8
+ # See the method group entitled Node@Serialization+and+Generating+Output for usage.
7
9
  class SaveOptions
8
10
  # Format serialized xml
9
11
  FORMAT = 1
@@ -22,7 +24,7 @@ module Nokogiri
22
24
 
23
25
  if Nokogiri.jruby?
24
26
  # Save builder created document
25
- AS_BUILDER = 128
27
+ AS_BUILDER = 128
26
28
  # the default for XML documents
27
29
  DEFAULT_XML = AS_XML # https://github.com/sparklemotion/nokogiri/issues/#issue/415
28
30
  # the default for HTML document
@@ -40,7 +42,9 @@ module Nokogiri
40
42
  attr_reader :options
41
43
 
42
44
  # Create a new SaveOptions object with +options+
43
- def initialize options = 0; @options = options; end
45
+ def initialize(options = 0)
46
+ @options = options
47
+ end
44
48
 
45
49
  constants.each do |constant|
46
50
  class_eval %{
@@ -55,7 +59,7 @@ module Nokogiri
55
59
  }
56
60
  end
57
61
 
58
- alias :to_i :options
62
+ alias_method :to_i, :options
59
63
  end
60
64
  end
61
65
  end