mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-28 09:16:44 +03:00
Bugfix: The ability to list more than one selector in :not() is experimental and not yet widely supported.
This commit is contained in:
parent
38049e0eb9
commit
1bb154d6f4
1 changed files with 3 additions and 2 deletions
5
dev/External/SquireUI.js
vendored
5
dev/External/SquireUI.js
vendored
|
|
@ -59,9 +59,10 @@ const doc = document,
|
|||
tpl.querySelectorAll('[data-x-div-type]').forEach(el => el.replaceWith(getFragmentOfChildren(el)));
|
||||
if (isPaste) {
|
||||
tpl.querySelectorAll(removeElements).forEach(el => el.remove());
|
||||
tpl.querySelectorAll(':not('+allowedElements+')').forEach(el => el.replaceWith(getFragmentOfChildren(el)));
|
||||
tpl.querySelectorAll('*').forEach(el => {
|
||||
if (el.hasAttributes()) {
|
||||
if (!el.matches(allowedElements)) {
|
||||
el.replaceWith(getFragmentOfChildren(el));
|
||||
} else if (el.hasAttributes()) {
|
||||
[...el.attributes].forEach(attr => {
|
||||
let name = attr.name.toLowerCase();
|
||||
if (!allowedAttributes.includes(name)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue