Skip to content

Product description is wrapped in – why?

Magento 2.4.6

When I am getting the product description programmatically using getDescription(), the description is wrapped in <div data-content-type="html" data-appearance="default" data-element="main" data-decoded="true">.

I suspect its related to the pagebuilder, but how can I avoid that? It does not happen for all products. My code is like this:

$desc = $product->getDescription();

And the result looks like that:

<div data-content-type="html" data-appearance="default" data-element="main" data-decoded="true">
    my description
</div>

The wrapping div can not be seen when opening the description of the product. So, how can this be avoided? I know there are similar questions out there, but no real answers :).

Thanks!