Skip to content

Commit 6d4a068

Browse files
committed
Fix the detection of the attach bbcode
See #6579
1 parent aa7cf0a commit 6d4a068

File tree

2 files changed

+2
-2
lines changed
  • ts/WoltLabSuite/Core/Component/Attachment
  • wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment

2 files changed

+2
-2
lines changed

ts/WoltLabSuite/Core/Component/Attachment/List.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function observeInsertedAttachments(element: HTMLElement, files: HTMLCollectionO
172172
embeddedAttachments.add(attachmentId);
173173
});
174174

175-
const bbcodeMatches = editor.element.innerText.matchAll(/\[attach=('\d+'|"\d+"|\d+)(?:,[^]]+?)?\]\[\/attach\]/g);
175+
const bbcodeMatches = editor.element.innerText.matchAll(/\[attach=(?:'|")?(\d+)(?:'|")?(?:,[^]]+?)?\]\[\/attach\]/g);
176176
for (const match of bbcodeMatches) {
177177
const attachmentId = parseInt(match[1]);
178178
embeddedAttachments.add(attachmentId);

wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/List.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)