Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Control Character Validation in IRI Class #1

Closed
bivens-dev opened this issue Mar 13, 2025 · 0 comments · Fixed by #2
Closed

Implement Control Character Validation in IRI Class #1

bivens-dev opened this issue Mar 13, 2025 · 0 comments · Fixed by #2
Labels
enhancement New feature or request

Comments

@bivens-dev
Copy link
Owner

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant