[wp-trac] [WordPress Trac] #54698: Add 'ruby' tag and its friends to kses

WordPress Trac noreply at wordpress.org
Fri Mar 18 18:31:34 UTC 2022


#54698: Add 'ruby' tag and its friends to kses
------------------------------+-----------------------------
 Reporter:  upsuper           |       Owner:  SergeyBiryukov
     Type:  enhancement       |      Status:  reviewing
 Priority:  normal            |   Milestone:  6.0
Component:  Formatting        |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * keywords:  has-patch => has-patch commit


Comment:

 Replying to [comment:4 upsuper]:
 > Indeed that `<ruby>` is the ancestor for all the other elements, but I'm
 confused by your patch. It seems to me that the second level of arrays are
 for attributes of the tag, not possible child tags, and `<table>` which
 has a similar structure as `<ruby>` doesn't contain any such child element
 either.

 You're right, the first PR here appears to be correct as is.

 [attachment:"54698.diff"] adds a unit test. This can be committed after
 #54699, as the test relies on the changes from that ticket.

 > The set of elements to enable such functionality consists of `<ruby>`,
 `<rt>`, and `<rp>` in the [https://html.spec.whatwg.org/multipage/text-
 level-semantics.html#the-ruby-element HTML Standard], while some browsers
 (like Firefox) also supports additional ones `<rb>` and `<rtc>` for more
 advanced formatting, which are not yet included in the official HTML spec,
 but can be found in a [https://www.w3.org/TR/html-ruby-extensions/ W3C
 extension].

 I'm not 100% sure we should add elements that are not in the official HTML
 spec, but don't see any harm in adding the `<rb>` and `<rtc>` tags either.
 If anyone has strong feelings either way, please comment :)

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


More information about the wp-trac mailing list