Why is data-quickedit-entity being printed in plain text when I'm signed in? I have a template for theming paragraph sections that, for some reason, prints out data-quickedit-entity-id="paragraph/2" in plaintext above any of my paragraphs that contain images.

{% set bgcolor = content.field_background_colour[0]["#markup"] ?: color_class %}
{% set bundle = paragraph.bundle ?: base_class %}
{% set image = content.field_section_image|without("label") %}
{%
  set classes = [
    "paragraph"|clean_class,
    "paragraph--" ~ bundle|clean_class,
    "paragraph--" ~ bundle|clean_class ~ "--" ~ bgcolor|clean_class,
  ]
%}
{{kint(attributes)}}
{% if attributes %}
  &lt;div{{ attributes.addClass(classes) }}&gt;
{% else %}
  &lt;div class="{% for class in classes %}{{ class ~ " " }}{% endfor %}"&gt;
{% endif %}

&lt;div class="paragraph--{{ bundle }}__inner"&gt;
{% if content %}
  {{ content.field_main_heading }}
    {% if content.field_sub_heading %}
      {{ content.field_sub_heading }}
    {% endif %}
    {% if content.field_section_image["#title"] %}
    {{ attributes.removeClass(classes) }}
      {% include "@base/layouts/grid/00-grid.twig" with {
        items: [image, content.field_body_text],
        grid_base_class: "grid",
        grid_modifiers: ["columns-2"]
        } %}
    {% else %}
      {{ content.field_body_text }}
    {% endif %}
{% else %}
  {{ dummy_content|raw }}
{% endif %}
&lt;/div&gt;
&lt;/div&gt;


This happens right above the image, inside the  on line 18. Screenshot below:



It only gets output when logged in as it's obviously something to do with the quickedit system.

Has anyone seen this or can advise on how to prevent it?
This line prints the attributes in plain text:

{{ attributes.removeClass(classes) }}


If you want to remove classes without printing then use set:

{% set attributes = attributes.removeClass(classes) %}