Skip to content

Commit 710bd96

Browse files
authored
dep: update libxml 2.12.6 (branch v1.16.x) (#3151)
**What problem is this PR intended to solve?** Update to v2.12.6, see https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.6 This also makes a small change to `XML::Reader` to accommodate changes in how libxml2 reports the encoding of the Reader (see https://gitlab.gnome.org/GNOME/libxml2/-/issues/697 for details). Closes #3148
2 parents 673756f + 461a96e commit 710bd96

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ Nokogiri follows [Semantic Versioning](https://semver.org/), please see the [REA
44

55
---
66

7+
## v1.16.3 / 2024-03-15
8+
9+
### Dependencies
10+
11+
* [CRuby] Vendored libxml2 is updated to [v2.12.6](https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.6) from v2.12.5. (@flavorjones)
12+
13+
14+
### Changed
15+
16+
* [CRuby] `XML::Reader` sets the `@encoding` instance variable during reading if it is not passed into the initializer. Previously, it would remain `nil`. The behavior of `Reader#encoding` has not changed. This works around changes to how libxml2 reports the encoding used in v2.12.6.
17+
18+
719
## v1.16.2 / 2024-02-04
820

921
### Security

dependencies.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
libxml2:
3-
version: "2.12.5"
4-
sha256: "a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21"
5-
# sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.5.sha256sum
3+
version: "2.12.6"
4+
sha256: "889c593a881a3db5fdd96cc9318c87df34eb648edfc458272ad46fd607353fbb"
5+
# sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.6.sha256sum
66

77
libxslt:
88
version: "1.1.39"

ext/nokogiri/xml_reader.c

+1
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ read_more(VALUE self)
537537
if (RTEST(constructor_encoding)) {
538538
c_document->encoding = xmlStrdup(BAD_CAST StringValueCStr(constructor_encoding));
539539
} else {
540+
rb_iv_set(self, "@encoding", NOKOGIRI_STR_NEW2("UTF-8"));
540541
c_document->encoding = xmlStrdup(BAD_CAST "UTF-8");
541542
}
542543
}

0 commit comments

Comments
 (0)