Let ScrollSpy support uri encoded hash fragments#14740
Closed
yuku wants to merge 3 commits intotwbs:masterfrom
yuku:scrollspy-decode-hash
Closed
Let ScrollSpy support uri encoded hash fragments#14740yuku wants to merge 3 commits intotwbs:masterfrom yuku:scrollspy-decode-hash
yuku wants to merge 3 commits intotwbs:masterfrom
yuku:scrollspy-decode-hash
Conversation
Collaborator
|
Please add a unit test for this feature. |
Collaborator
|
This would probably be necessary for other plugins too. |
Author
js/tests/unit/scrollspy.js
Outdated
Collaborator
There was a problem hiding this comment.
Please use four spaces for indentation in front of these pluses.
Author
|
@hnrch02 Done. If I should merge these three commits into a single commit, please let me know. |
Collaborator
Collaborator
|
@cvrebert Yeah, I think so. |
Collaborator
|
Closing this per my answer in #14789 (comment). We'll try to support all kinds of exotic (but still valid) IDs in v4. Thanks for the work though! |
Closed
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.
The updated line threw a syntax error when an encoded fragment is given.
And browsers (at least Chrome 37.0.2062.124 and Firefox 32.0.3) automatically encodes
a[href]values due to rfc3986:This means that there is no way to use the plugin with non-ascii hash fragments. This PR fixes the problem.
Patched script works fine on my pages, however, I'm afraid of breaking something important because I'm not familiar with such encoding problems 😨
Thanks.