feat: guarantee correct URL#996
Merged
jkowalleck merged 5 commits intoCycloneDX:mainfrom Dec 11, 2023
Merged
Conversation
Contributor
Author
|
I am not a Typescript developer, yet I want to have this fix -> I propose a concept for fixing this issue in order to get feedback |
jkowalleck
requested changes
Dec 5, 2023
Member
|
✖️ the proposed solution is insufficient. it will double-encode. encodeURI("https://acme.org/foo%5B%5D=bar")
// actual: "https://acme.org/foo%255B%255D=bar"
// expected: "https://acme.org/foo%5B%5D=bar"please find a different solution. |
added 2 commits
December 6, 2023 15:48
Show exemplary use of encodeURI(). Also show how to access URL when optional in a class. Show that tests till succeed. Signed-off-by: mzl2fe <luca.mazzon@etas.com>
Since encodeURI() was encoding too rigorously a new helper function was introduced which can be configured to our specific needs. Signed-off-by: mzl2fe <luca.mazzon@etas.com>
150befb to
7c5705a
Compare
jkowalleck
reviewed
Dec 6, 2023
Member
|
@mLuca i will add unit tests and fix your implementation. |
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Member
|
added the tests, fixed the implementation. |
jkowalleck
approved these changes
Dec 11, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Serialization/normalization guarantees valid URI values according to JSON/XML specification
fixes #992