leptris 1.9.29 → 1.9.30
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 +4 -4
- data/CHANGELOG.md +12 -0
- data/Rakefile +1 -1
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/ffi.rb +4 -0
- data/lib/leptris/xml/parse_options.rb +20 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0b15f4a5205c3ad2ed40cddbddf2c6d517b02fba4d80001d1a803ee4d1c5c47
|
|
4
|
+
data.tar.gz: 52cbfce90c464a45894568060b38d906e0ab9e2d613f0d005051ff51768ef180
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6eec31bcfa4b5fdadcaa14902374fe177541e8db51a1b13488899984c8ec425d94e7d047f1a4726173869a9b306e15519bb097018109ec9177dc4b11b72cb103
|
|
7
|
+
data.tar.gz: 21a07b86e6fb0237eca6aed383badc2f30c41caafb690dbb45ba152bdabd6a9f25446cb8ebd9c7c52a99446da5fe1bae88b76abb95078a0d18c70a80e7b00098
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to Leptris will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.9.30] - 2026-08-28
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **DTD ATTLIST defaults no longer injected by default** (vendored
|
|
13
|
+
libleptris 1.9.8, leptris/leptris#606): raw parses leave ATTLIST
|
|
14
|
+
default attributes out — the libxml2/Nokogiri default the ecosystem
|
|
15
|
+
compares against, and what W3C C14N 1.1 example 3.3's canonical
|
|
16
|
+
form assumes. New `Leptris::XML::ParseOptions::DTDATTR` /
|
|
17
|
+
`.dtdattr` / `#dtdattr?` / `#dtdattr=` opts in (libxml2
|
|
18
|
+
XML_PARSE_DTDATTR parity).
|
|
19
|
+
|
|
8
20
|
## [1.9.29] - 2026-08-28
|
|
9
21
|
|
|
10
22
|
### Fixed
|
data/Rakefile
CHANGED
|
@@ -8,7 +8,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
8
8
|
# Pin for `rake compile` and the platform-gem builds. Keep in lockstep
|
|
9
9
|
# with .github/workflows/build.yml (which calls `rake compile`) and the
|
|
10
10
|
# CHANGELOG when libleptris releases.
|
|
11
|
-
LIBLEPTRIS_VERSION = "1.9.
|
|
11
|
+
LIBLEPTRIS_VERSION = "1.9.8"
|
|
12
12
|
|
|
13
13
|
CMAKE_FLAGS = %w[
|
|
14
14
|
-DCMAKE_BUILD_TYPE=Release
|
data/lib/leptris/version.rb
CHANGED
data/lib/leptris/xml/ffi.rb
CHANGED
|
@@ -734,6 +734,10 @@ module Leptris
|
|
|
734
734
|
|
|
735
735
|
LEPTRIS_PARSE_DEFAULT = 0
|
|
736
736
|
LEPTRIS_PARSE_DROP_WS_TEXT = 1
|
|
737
|
+
# libleptris >= 1.9.8 (#606): apply DTD ATTLIST default (and
|
|
738
|
+
# #FIXED) attribute values at parse time — libxml2
|
|
739
|
+
# XML_PARSE_DTDATTR opt-in parity.
|
|
740
|
+
LEPTRIS_PARSE_DTDATTR = 2
|
|
737
741
|
|
|
738
742
|
# The headers' contract is UTF-8 for every C string, but FFI's
|
|
739
743
|
# read_string hands back ASCII-8BIT — the platform default
|
|
@@ -9,6 +9,14 @@ class Leptris::XML::ParseOptions
|
|
|
9
9
|
# way do not round-trip pretty-printed formatting byte-for-byte.
|
|
10
10
|
NOBLANKS = Leptris::XML::FFI::LEPTRIS_PARSE_DROP_WS_TEXT
|
|
11
11
|
|
|
12
|
+
# Apply DTD ATTLIST default (and #FIXED) attribute values at parse
|
|
13
|
+
# time (libleptris >= 1.9.8, leptris/leptris#606). Matches libxml2's
|
|
14
|
+
# XML_PARSE_DTDATTR and Nokogiri's dtdload+dtdattr semantics. Off by
|
|
15
|
+
# default: the ecosystem compares against libxml2's no-DTDATTR
|
|
16
|
+
# default, and W3C C14N 1.1 example 3.3's canonical form excludes
|
|
17
|
+
# defaulted attributes.
|
|
18
|
+
DTDATTR = Leptris::XML::FFI::LEPTRIS_PARSE_DTDATTR
|
|
19
|
+
|
|
12
20
|
attr_reader :flags
|
|
13
21
|
|
|
14
22
|
# Recover (libleptris 1.9.0, #547): a parse failure returns an
|
|
@@ -36,6 +44,18 @@ class Leptris::XML::ParseOptions
|
|
|
36
44
|
@flags & NOBLANKS != 0
|
|
37
45
|
end
|
|
38
46
|
|
|
47
|
+
def self.dtdattr
|
|
48
|
+
new(DTDATTR)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def dtdattr?
|
|
52
|
+
@flags & DTDATTR != 0
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def dtdattr=(value)
|
|
56
|
+
if value then @flags |= DTDATTR else @flags &= ~DTDATTR end
|
|
57
|
+
end
|
|
58
|
+
|
|
39
59
|
def recover?
|
|
40
60
|
@recover == true
|
|
41
61
|
end
|