We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f46217 commit 84de798Copy full SHA for 84de798
url/src/host.rs
@@ -170,7 +170,7 @@ impl Host<String> {
170
fn domain_to_ascii(domain: &str) -> Result<String, ParseError> {
171
// without idna feature, we can't verify that xn-- domains correctness
172
let domain = domain.to_lowercase();
173
- if domain.is_ascii() && !domain.starts_with("xn--") {
+ if domain.is_ascii() && domain.split('.').all(|s| !s.starts_with("xn--")) {
174
Ok(domain)
175
} else {
176
Err(ParseError::InvalidDomainCharacter)
0 commit comments