Skip to content

Commit

Permalink
Merge branch 'main' into main-jd-fix-node-sass-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond committed Mar 27, 2023
2 parents 43ed51a + cad38ef commit 20f2584
Show file tree
Hide file tree
Showing 21 changed files with 329 additions and 498 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -58,7 +58,7 @@ Read the [Getting started page](https://getbootstrap.com/docs/5.3/getting-starte

## Status

[![Build Status](https://img.shields.io/github/actions/workflow/status/twbs/bootstrap/js.yml?branch=main&label=JS%20Tests&logo=github)](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Amain)
[![Build Status](https://img.shields.io/github/actions/workflow/status/twbs/bootstrap/js.yml?branch=main&label=JS%20Tests&logo=github)](https://github.com/twbs/bootstrap/actions/workflows/js.yml?query=workflow%3AJS+branch%3Amain)
[![npm version](https://img.shields.io/npm/v/bootstrap?logo=npm&logoColor=fff)](https://www.npmjs.com/package/bootstrap)
[![Gem version](https://img.shields.io/gem/v/bootstrap?logo=rubygems&logoColor=fff)](https://rubygems.org/gems/bootstrap)
[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue?logo=meteor&logoColor=fff)](https://atmospherejs.com/twbs/bootstrap)
Expand Down
6 changes: 3 additions & 3 deletions config.yml
Expand Up @@ -80,9 +80,9 @@ params:
js_hash: "sha384-heAjqF+bCxXpCWLa6Zhcp4fu20XoNIA98ecBC1YkdXhszjoejr5y9Q77hIrv8R9i"
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/js/bootstrap.bundle.min.js"
js_bundle_hash: "sha384-qKXV1j0HvMUeCBQ+QVp7JcfGl760yU08IQ+GpUo5hlbpg51QRiuqHAJz8+BrxE/N"
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"
popper_hash: "sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3"
popper_esm: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/esm/popper.min.js"
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.7/dist/umd/popper.min.js"
popper_hash: "sha384-zYPOMqeu1DAVkHiLqWBUTcbYfZ8osu1Nd6Z89ify25QV9guujx43ITvfi12/QExE"
popper_esm: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.7/dist/esm/popper.min.js"

anchors:
min: 2
Expand Down
2 changes: 1 addition & 1 deletion js/src/tooltip.js
Expand Up @@ -62,7 +62,7 @@ const Default = {
delay: 0,
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
html: false,
offset: [0, 0],
offset: [0, 6],
placement: 'top',
popperConfig: null,
sanitize: true,
Expand Down
6 changes: 4 additions & 2 deletions js/src/util/sanitizer.js
Expand Up @@ -16,8 +16,6 @@ const uriAttributes = new Set([
'xlink:href'
])

const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i

/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
*
Expand Down Expand Up @@ -48,6 +46,9 @@ const allowedAttribute = (attribute, allowedAttributeList) => {
.some(regex => regex.test(attributeName))
}

// js-docs-start allow-list
const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i

export const DefaultAllowlist = {
// Global attributes allowed on any supplied element below.
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
Expand Down Expand Up @@ -81,6 +82,7 @@ export const DefaultAllowlist = {
u: [],
ul: []
}
// js-docs-end allow-list

export function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
if (!unsafeHtml.length) {
Expand Down

0 comments on commit 20f2584

Please sign in to comment.