N°8570 - 🐛 Allow @ as part of url #729
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Base information
Symptom (bug) / Objective (enhancement)
Some type of URL is not parsed correctly by the url_validation_pattern, like this:
https://calendar.example.com/book/[email protected]/
Reproduction procedure (bug)
Paste the given example to a text field in itop and look at the rendered output. The link will stop right before the at-sign.
Cause (bug)
The DEFAULT_VALIDATION_PATTERN does not allow the @ sign as part of the URL
Proposed solution (bug and enhancement)
Add the @ sign to the regex.
According to RFC 3986 – Uniform Resource Identifier (URI): Generic Syntax, the @ character is a valid character within path segments of a URI. Specifically, it is part of the allowed pchar set and does not need to be percent-encoded (%40) when used in the path component — as long as it is not part of the userinfo or authority sections.
Checklist before requesting a review