Fix CSP error when reading images from the clipboard using the paste command (#1328)
This commit is contained in:
parent
588d8a681a
commit
af6e9a8153
@ -134,6 +134,9 @@ class ClipboardReader {
|
||||
document.execCommand('paste');
|
||||
const image = target.querySelector('img[src^="data:"]');
|
||||
const result = (image !== null ? image.getAttribute('src') : null);
|
||||
for (const image2 of target.querySelectorAll('img')) {
|
||||
image2.removeAttribute('src');
|
||||
}
|
||||
target.textContent = '';
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user