Skip to content

Commit c2e4bae

Browse files
committed
fix regex to correctly match the src attribute when there is a data-src attribute
1 parent 2908884 commit c2e4bae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browser/main/lib/dataApi/attachmentManagement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ function handleAttachmentDrop (codeEditor, storageKey, noteKey, dropEvent) {
287287
if (item.type === 'text/html') {
288288
const html = dropEvent.dataTransfer.getData('text/html')
289289

290-
const match = /<img[^>]*src="([^"]+)"/.exec(html)
290+
const match = /<img[^>]*[\s"']src="([^"]+)"/.exec(html)
291291
if (match) {
292292
const imageURL = match[1]
293293

0 commit comments

Comments
 (0)