nokogiri 1.19.5-java → 1.19.6-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6d7d6a8cdaeda70bba537e8bb1776407fae18003ff7d1b7a1bd406c9704902a
4
- data.tar.gz: 4de017065a52bc5fe46178fc40313b0a469a81d6508826e4b75909b07832383d
3
+ metadata.gz: 313bb0269b22ba0b3ad9211f7e78ffb8f0abfea4b9a3a36b64442484e0bef5ae
4
+ data.tar.gz: 4528ad879241aa69a7d0d2b362d750c04b2eea063f3203990d4ea004aa0372a8
5
5
  SHA512:
6
- metadata.gz: 8203156eb8d63b7e0edb4ea37a1cc3820b349101931e20d83a08bd2f4734004403f63b1ed6b09366dc70907f11cf5404194e8bb901433dd090321e1db2cf57c4
7
- data.tar.gz: 2709de3b7f5b823e8b051ee81b2c84e46b4b6465d7801d63797004bbca078e39ba7723b2a2471d32c457a465cdb216b063f4854c00b1ca74ef9f19170040b05c
6
+ metadata.gz: a81e7d6a28c02576f237f6128e6d09dfdea0dd7700cb1a23c62c4b4597d29933f2f3006842a6802dd7cf80f3ab3f6c0cfc9469ba00582752dd356d7713256f57
7
+ data.tar.gz: ebca9a8adfe84aedd68e3426352c67cf3446b3ac35150d6433b91246c68c73b2f74152fa7aae1094cd742357d692391afbbe111def7c1e447cfc453da476b02e
@@ -431,13 +431,18 @@ public class XmlNode extends RubyObject
431
431
  String prefix = e.getPrefix();
432
432
  String nsURI = e.lookupNamespaceURI(prefix);
433
433
  this.node = NokogiriHelpers.renameNode(e, nsURI, e.getNodeName());
434
+ // renameNode may replace the element when it assigns a namespace, so continue with the returned element
435
+ e = (Element) this.node;
434
436
 
435
437
  if (nsURI == null || nsURI.isEmpty()) {
436
438
  RubyBoolean ns_inherit =
437
439
  (RubyBoolean)document(context.runtime).getInstanceVariable("@namespace_inheritance");
438
440
  if (ns_inherit.isTrue()) {
439
441
  set_namespace(context, ((XmlNode)parent(context)).namespace(context));
442
+ e = (Element) this.node;
440
443
  }
444
+ // in an HTML4 document, an xmlns attribute must not put the descendants in a namespace
445
+ if (document(context.runtime) instanceof Html4Document) { return; }
441
446
  } else {
442
447
  String currentPrefix = e.getParentNode().lookupPrefix(nsURI);
443
448
  String currentURI = e.getParentNode().lookupNamespaceURI(prefix);
Binary file
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Nokogiri
4
4
  # The version of Nokogiri you are using
5
- VERSION = "1.19.5"
5
+ VERSION = "1.19.6"
6
6
  end
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.19.5
4
+ version: 1.19.6
5
5
  platform: java
6
6
  authors:
7
7
  - Mike Dalessio