prefix.cc
prefix.cc copied to clipboard
Don't allow multiple #'s in URLs
https://prefix.cc/latitude currently maps to two possible URLs. One of them is:
https://www.w3.org/2006/vcard/ns#latitude#
This is mal-formed, as URLs cannot contain multiple hash signs.
I noticed when trying to parse https://prefix.cc/popular/all.file.ttl with rio's TurtleParser
and got
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
TurtleError {
kind: InvalidIri {
iri: "https://www.w3.org/2006/vcard/ns#latitude#",
error: IriParseError { kind: InvalidIriCodePoint('#') }
},
position: Some(LineBytePosition { line_number: 1286, byte_number: 65 })
}', src/prefixes/prefixcc.rs:31:10