[wp-trac] [WordPress Trac] #13340: wpautop breaks inline MathML

WordPress Trac noreply at wordpress.org
Tue Dec 13 17:06:47 UTC 2022


#13340: wpautop breaks inline MathML
----------------------------+------------------------------
 Reporter:  nicholaswilson  |       Owner:  (none)
     Type:  enhancement     |      Status:  reopened
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Formatting      |     Version:  2.9.2
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  accessibility
----------------------------+------------------------------
Changes (by joedolson):

 * focuses:   => accessibility


Comment:

 If wrapping the `math` element with `p` tags can break it, it would make
 the most sense to add it to the list of excluded elements. Because it's a
 limited use element that's only viable in specialist use cases, I think
 the risk of breaking people's sites because they're expecting the tag to
 be wrapped in `p` is quite low.

 MathML, while still having poor native support, is the only practical way
 to communicate mathematics accessibly, so breaking that is a real problem.

 I think that the principle of `wpautop` is to attempt to wrap text that is
 either unmarked or marked only with inline elements; the exclusion list is
 intended to prevent breaking existing markup. Since running `wpautop` on
 `math` elements has a strong potential to break markup, I think it should
 be considered.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/13340#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list