diff --git a/ts/WoltLabSuite/Core/Component/Attachment/List.ts b/ts/WoltLabSuite/Core/Component/Attachment/List.ts index 656ff48481..a32e0e13e6 100644 --- a/ts/WoltLabSuite/Core/Component/Attachment/List.ts +++ b/ts/WoltLabSuite/Core/Component/Attachment/List.ts @@ -172,7 +172,7 @@ function observeInsertedAttachments(element: HTMLElement, files: HTMLCollectionO embeddedAttachments.add(attachmentId); }); - const bbcodeMatches = editor.element.innerText.matchAll(/\[attach=('\d+'|"\d+"|\d+)(?:,[^]]+?)?\]\[\/attach\]/g); + const bbcodeMatches = editor.element.innerText.matchAll(/\[attach=(?:'|")?(\d+)(?:'|")?(?:,[^]]+?)?]\[\/attach]/g); for (const match of bbcodeMatches) { const attachmentId = parseInt(match[1]); embeddedAttachments.add(attachmentId);