-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: change sanitizeUrl to handle URLs without a protocol schema #36317
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
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 929a56a The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #36317 +/- ##
========================================
Coverage 64.78% 64.78%
========================================
Files 3153 3153
Lines 104879 104870 -9
Branches 19986 19979 -7
========================================
- Hits 67946 67943 -3
+ Misses 34247 34234 -13
- Partials 2686 2693 +7
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
After adding a new function that sanitizes URLs and blocks the usage of dangerous protocol schemas such as
javascript:, a bug was introduced. URLs without a predefined protocol will return#:This PR changes that behavior to ensure that URLs without a predefined protocol will return a protocol-relative URL:
URLs with protocols are returned normally:
While dangerous protocol schemas are blocked:
Issue(s)
CORE-1215
Steps to test or reproduce
N/A
Further comments
N/A