aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2021-01-14 00:29:26 +0200
committerGitHub <[email protected]>2021-01-14 00:29:26 +0200
commit1b46601ce8461fbafc5c33d7b9030ea0ad306671 (patch)
treeea42bc635aa109d8a96da75d0ee31074fe66732c /js/src
parent80c0d4deab672b81edd0a35edfabdd959ca77095 (diff)
downloadbootstrap-1b46601ce8461fbafc5c33d7b9030ea0ad306671.tar.xz
bootstrap-1b46601ce8461fbafc5c33d7b9030ea0ad306671.zip
Bump eslint-plugin-unicorn from 25.0.1 to 26.0.1 (#32784)
* Bump eslint-plugin-unicorn from 25.0.1 to 26.0.1 Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 25.0.1 to 26.0.1. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v25.0.1...v26.0.1) Signed-off-by: dependabot[bot] <[email protected]> * Updates for `[email protected]` Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: XhmikosR <[email protected]>
Diffstat (limited to 'js/src')
-rw-r--r--js/src/dom/event-handler.js1
-rw-r--r--js/src/util/sanitizer.js4
2 files changed, 3 insertions, 2 deletions
diff --git a/js/src/dom/event-handler.js b/js/src/dom/event-handler.js
index 2ee13bafc..e3c685530 100644
--- a/js/src/dom/event-handler.js
+++ b/js/src/dom/event-handler.js
@@ -112,6 +112,7 @@ function bootstrapDelegationHandler(element, selector, fn) {
event.delegateTarget = target
if (handler.oneOff) {
+ // eslint-disable-next-line unicorn/consistent-destructuring
EventHandler.off(element, event.type, fn)
}
diff --git a/js/src/util/sanitizer.js b/js/src/util/sanitizer.js
index d908dd661..ce3d455a6 100644
--- a/js/src/util/sanitizer.js
+++ b/js/src/util/sanitizer.js
@@ -37,7 +37,7 @@ const allowedAttribute = (attr, allowedAttributeList) => {
if (allowedAttributeList.includes(attrName)) {
if (uriAttrs.has(attrName)) {
- return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
+ return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue))
}
return true
@@ -47,7 +47,7 @@ const allowedAttribute = (attr, allowedAttributeList) => {
// Check if a regular expression validates the attribute.
for (let i = 0, len = regExp.length; i < len; i++) {
- if (attrName.match(regExp[i])) {
+ if (regExp[i].test(attrName)) {
return true
}
}