Closed
Description
Description
According to RFC 3987 (Internationalized Resource Identifiers), control characters (U+0000 to U+001F, U+007F to U+009F) are not allowed directly within an IRI string (they must be percent-encoded). This issue tracks the implementation of a validation check for control characters in the IRI
class of the rdf_dart
package.
Goal
The goal of this issue is to implement the _isValidControlCharacters
function within the IRI
class (lib/src/iri.dart
). This function will:
- Examine an IRI string to detect any presence of control characters outside of valid percent-encoded sequences.
- Throw an
InvalidIRIException
if any such control characters are detected. - Make sure that the characters TAB, CR and LF are not rejected.
Implementation Notes
- Refer to RFC 3987, Section 2.2 .
- Ensure that control characters within valid percent-encoded sequences (e.g.,
%00
) are not flagged as invalid. - Ensure that control characters TAB, CR and LF are not rejected.
- Leverage the existing
InvalidIRIException
for error handling.