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
fix: Make URLUtil.encodeURI behave like encodeURI in JavaScript and add encodeURIComponent #12291
Conversation
…dd encodeURIComponent
05ba370
to
2cced68
Compare
SonarQube analysis reported 2 issues
|
URI uri = new URI(UrlUtil.encodeURI(strippedPath)); | ||
// : is completely valid in a path but URI will think that defines a | ||
// protocol so skip it for the check | ||
URI uri = new URI(UrlUtil.encodeURI(strippedPath).replace(":", "")); | ||
if (uri.isAbsolute()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the initial check un-necessary as we can never have a uri with a scheme at this point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would seem so if we first remove : and then check for :
Let's fix in a separate PR
This ticket/PR has been released with platform 22.0.0.beta2 and is also targeting the upcoming stable 22.0.0 version. |
…dd encodeURIComponent (#12291)
…dd encodeURIComponent (#12291)
…dd encodeURIComponent (#12291)
…dd encodeURIComponent (#12291)
This ticket/PR has been released with platform 14.8.4. |
No description provided.