uri-whatwg_parser 0.3.1 → 0.3.2
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 +4 -0
- data/README.md +1 -1
- data/lib/uri/whatwg_parser/host_parser.rb +7 -1
- data/lib/uri/whatwg_parser/version.rb +1 -1
- 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: 429ffad8e497da64d3099494ddf9c5c3165a318f12cefab8479558b4e99eedb1
|
|
4
|
+
data.tar.gz: 2b507165b0f8662ce33e8f76e4680889d703d720cf10ee4d7037c44d956bb99c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2fe207e948cb2efaa556cb71b43a31c1bef4ee74c6fd55b22f90744cb459a619423d799b149b0f1c6fc9074d092088824294e50c1311400b2094afe545d0caa2
|
|
7
|
+
data.tar.gz: 132dfce557f8233213b2d2747f0d82da42a301a0bd42b9491a2224261a1ef2d26bf441114222dc009a36ae08655edaea7d916173e6ba286cfd12c9265dfbfb6a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# URI::WhatwgParser
|
|
2
2
|
Ruby implementation of the [WHATWG URL Living Standard](https://url.spec.whatwg.org/).
|
|
3
3
|
|
|
4
|
-
The latest revision that this package implements of the standard is [
|
|
4
|
+
The latest revision that this package implements of the standard is [26 June 2026](https://url.spec.whatwg.org/commit-snapshots/3c83874ae1eac84ceb71d8c4344673251c982bbe/)
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
@@ -259,7 +259,13 @@ class URI::WhatwgParser
|
|
|
259
259
|
return domain
|
|
260
260
|
end
|
|
261
261
|
|
|
262
|
-
|
|
262
|
+
begin
|
|
263
|
+
ascii_domain = URI::IDNA.whatwg_to_ascii(domain.force_encoding(Encoding::UTF_8), be_strict: false)
|
|
264
|
+
rescue URI::IDNA::Error, Encoding::CompatibilityError, ArgumentError
|
|
265
|
+
raise ParseError, "invalid host value" unless domain.ascii_only?
|
|
266
|
+
|
|
267
|
+
ascii_domain = domain.downcase
|
|
268
|
+
end
|
|
263
269
|
|
|
264
270
|
raise ParseError, "including invalid value in host" if include_forbidden_domain_code_point?(ascii_domain)
|
|
265
271
|
raise ParseError, "host can't be empty" if ascii_domain.empty?
|