-
-
Notifications
You must be signed in to change notification settings - Fork 78.4k
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
Prevent getSelector
from returning URLs as selector
#32586
Merged
XhmikosR
merged 11 commits into
twbs:main
from
RoflCopter24:32273-dropdown-item-error-with-external-link
Feb 3, 2021
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
20fca9b
added checks to getSelector in util to prevent returning hrefs that a…
24fe99c
restored compatibility for the class selector and added test cases fo…
d5f340d
Merge branch 'main' into 32273-dropdown-item-error-with-external-link
RoflCopter24 9540d6c
Code review: merge null check into following condition
0896531
Merge branch 'main' into 32273-dropdown-item-error-with-external-link
RoflCopter24 7883619
Update index.spec.js
XhmikosR 82b1274
Merge branch 'main' into 32273-dropdown-item-error-with-external-link
XhmikosR 2349e56
Update index.js
XhmikosR 9636ebf
Merge branch 'main' into 32273-dropdown-item-error-with-external-link
RoflCopter24 c8629a7
Update index.js
XhmikosR 544c852
Merge branch 'main' into 32273-dropdown-item-error-with-external-link
XhmikosR File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
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 restricts the user to use only the class and id selectors in the href attribute. This restriction was not before 🤔
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.
I do not see a problem there. I did not find any mention in the documentation, that anything other than IDs in the href are even supported.
Considering that that freedom for using invalid hrefs as selectors was exactly what caused problems and lead to this PR (and this is the big jump to v5), I think this would be the last opportunity to make such a change before possibly a myriad of users starts misusing the href in that way.
Besides, that's what the
data-bs-target
attribute is for, right? (which is encouraged everywhere in the docs)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.
Actually, this would fix the issue we have. I guess it's a good solution for v5. We can revisit in v6.