`<div>` is stripped out of the `<dd>` element
π Provide detailed reproduction steps (if any)
- Go toΒ
- Set the following content:
<dl>
<dt><p>Question text</p></dt>
<dd><p>Answer text starts here</p>
<div>
<p>Paragraph inside div</p>
div content
</div>
</dd>
</dl>
βοΈ Expected result
The markup is preserved.
β Actual result
<div> is stripped out and its paragraph is moved outside of the <dl> element:
<dl>
<dt>
<p>
Question text
</p>
</dt>
<dd>
<p>
Answer text starts here
</p>
</dd>
</dl>
<p>
Paragraph inside div
</p>
π Other details
The dd element can contain the flow content, so it should preserve <div>.
If you'd like to see this fixed sooner, add a π reaction to this post.
Hi @Witoso ,
Any update on this issue? We are also facing this problem. CKE5 is modifying HTML and stripping off <div> tag even enough we have enabled the General HTML support via below config to allow all tags. Note that this is a valid HTML also.
allow: [
{
name: /.*/,
attributes: true,
classes: true,
styles: true
}
],
disallow: [ ],
allowEmpty : [/.*/],
}
@sudheerb this is likely linked to the same issue in #15408 Apparently ckeditor converts the html to an abstract tree and then uses its own sanitizer on it which transforms html. The rules of this sanitizer aren't written down anywhere i can find, but a quick search in this repo reveals there are several bugs resulting from this sanitizer transforming valid html.
According to @Witoso in that same thread this wil not get fixed.