I have an <svg> element included into a <p>, after the process, the <svg> element is moved after the <p>.
My question is why this decision? I've seen that I can modify this behavior in org.htmlcleaner.Html5TagProvider.embeddedContentTags(TagInfo) but I would like to understand why this element must be pushed outside its parent?
Looks like a spec change. In the current WHATWG spec, SVG is now listed as being Phrasing Content whereas before I think it was only classed Embedded Content, hence why it gets moved, as P tag can only have Phrasing Content. We can redefine it in the default spec model for HC to reflect that.
Fixed and will be in v2.28 release.