Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js/src/util
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2021-01-14 01:29:26 +0300
committerGitHub <noreply@github.com>2021-01-14 01:29:26 +0300
commit1b46601ce8461fbafc5c33d7b9030ea0ad306671 (patch)
treeea42bc635aa109d8a96da75d0ee31074fe66732c /js/src/util
parent80c0d4deab672b81edd0a35edfabdd959ca77095 (diff)
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] <support@github.com> * Updates for `eslint-plugin-unicorn@26.0.1` Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Diffstat (limited to 'js/src/util')
-rw-r--r--js/src/util/sanitizer.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/util/sanitizer.js b/js/src/util/sanitizer.js
index d908dd6610..ce3d455a62 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
}
}