This sounds a bit odd, but the problem can be provoked by dragging only a portion of the short code:

partial seelction of shortcode

Now do:

  • Drag and drop the selected text below "Test text" (no visual feedback because we do not use the handle)

Source before drag and drop:

<h2>insert_view_adv</h2>

<p>{"inserted_view_adv":"h4c_group_content_embeds=block_faq","arguments":[""]}</p>

<p>Test text</p>

Source after drag and drop:

<h2><img src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" /><span style="background:rgba(220, 220, 220, 0.5) url(&quot;http://275-iva.site-h4c-dev.mbm.wod.by/core/assets/vendor/ckeditor/plugins/widget/images/handle.png&quot;) repeat scroll 0% 0%; display:block; left:0px; top:-15px"><img height="15" role="presentation" src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" title="Click and drag to move" width="15" /></span></h2>

<p>Test text</p>

<h2>insert_view_adv</h2>

<p>{"inserted_view_adv":"h4c_group_content_embeds=block_faq","arguments":[""]}</p>

Generally this is only possible when we select text and the shortcode. Only selecting the shortcode does not allow to drag and drop except for when the handle is used. In entity_embed I could provoke similar behavior but then the entity was duplicated which is also not nice, but not as bad as creating a new random image either.

Comments

anruether created an issue. See original summary.

anruether’s picture

Title: Shortcode drag and drop creates base64 img code » Shortcode drag and drop can create base64 img code
anruether’s picture

StatusFileSize
new17.29 KB
new17.59 KB

Some more testing. This drag and drop works (select the full shortcode row including handle):

select full shortcode

Select only the shortcode text (which also does not select the handle). This leads to the handle left as base64 image in the original place.

select partial shortcode

So we literally forget to copy the handle. Which might be an effect of the upstream issue I filed: #3082750: Drag and drop of media and text duplicates embedded media

a.dmitriiev’s picture

Status: Active » Closed (won't fix)