Menu

#231 SVG moved after <p> elements

v2.30
open-accepted
nobody
svg (1)
5
2023-06-19
2022-06-17
jlacour31
No

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?

Discussion

  • Scott Wilson

    Scott Wilson - 2022-06-17

    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.

     
  • Scott Wilson

    Scott Wilson - 2023-04-29
    • Group: v 2.7 --> v2.29
     
  • Scott Wilson

    Scott Wilson - 2023-04-29
    • status: open --> open-accepted
    • Group: v2.29 --> v2.28
     
  • Scott Wilson

    Scott Wilson - 2023-04-29

    Fixed and will be in v2.28 release.

     
  • Scott Wilson

    Scott Wilson - 2023-06-19
    • Group: v2.28 --> v2.30
     

Log in to post a comment.

MongoDB Logo MongoDB