1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-02 01:42:36 +02:00

Properly escape IDs in getSelector() to handle weird IDs (#35565) (#35566)

This commit is contained in:
Pierre Souchay
2022-11-07 13:43:06 +01:00
committed by GitHub
parent e81e7cda90
commit ef4e2daa48
5 changed files with 59 additions and 6 deletions

View File

@@ -5,7 +5,7 @@
* --------------------------------------------------------------------------
*/
import { isDisabled, isVisible } from '../util/index.js'
import { isDisabled, isVisible, parseSelector } from '../util/index.js'
/**
* Constants
@@ -99,6 +99,7 @@ const SelectorEngine = {
}
selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null
selector = parseSelector(selector)
}
return selector