Fix accordion and tab targets with special meaning characters#14789
Fix accordion and tab targets with special meaning characters#14789jaskorpe wants to merge 2 commits intotwbs:masterfrom
Conversation
Issue twbs#13832 suggests escaping the selector, but this issue is fixed much more cleanly with an attribute selector. Because bootstrap documentation uses href's with hash links, this patch allows links both with and without leading hash
Issue twbs#13832 suggests escaping the selector, but this issue is fixed much more cleanly with an attribute selector. Because bootstrap documentation uses href's with hash links, this patch allows links both with and without leading hash
|
Not sure about parsing but Sizzle uses the much faster Anyways, as I said in #13832 (comment), support for these "exotic" IDs is planned for v4 so I'd rather not go this route for v3. |
|
I did see that you wanted to wait, but I didn't see any mention of attribute selectors in the proposed patch. If there indeed is a performance penalty, I agree that it is best not to merge these patches. The patches also introduces some uncertainty in the api since the documentation suggests using # as href value, and then allowing the id to start with a hash. |
|
I will close this as we're unlikely to add support for this in v3. |
|
Another weird case is IDs with a colon. For example, Hugo will generate section anchors with IDs like While this is a valid "href" attribute for an anchor, passing it to jQuery directly will not find the element. However, |
This fixes the issue of special meaning characters in id's on togglable tabs, and collapsible panels without the need for escaping the id's.
Refs: #14285, #13832