Fixed embedded attachments being duplicated on enter
authorAlexander Ebert <ebert@woltlab.com>
Tue, 21 Jun 2016 12:27:07 +0000 (14:27 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 21 Jun 2016 12:27:15 +0000 (14:27 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index f2e43567a150fe2c9d78ed81294e57c346ee570c..d40e76138adfafba261722d08a3590cf94049848 100644 (file)
@@ -1723,7 +1723,7 @@ RedactorPlugins.wbbcode = function() {
                                }
                                
                                this.wutil.insertDynamic(
-                                       '<img src="' + $attachmentUrl.replace(/987654321/, attachmentID) + '" class="redactorEmbeddedAttachment' + (!insertFull ? ' redactorDisableResize' : '') + '" data-attachment-id="' + attachmentID + '"' + $style + ' />',
+                                       '&#8203;<img src="' + $attachmentUrl.replace(/987654321/, attachmentID) + '" class="redactorEmbeddedAttachment' + (!insertFull ? ' redactorDisableResize' : '') + '" data-attachment-id="' + attachmentID + '"' + $style + ' />&#8203;',
                                        '[attach=' + attachmentID + (insertFull ? ',none,' + $imageAttachments[attachmentID].width : '') + '][/attach]'
                                );
                        }