[wp-trac] [WordPress Trac] #62246: wp_print_font_faces() prints an HTML tag with an id property despite being able to be used more than once.

WordPress Trac noreply at wordpress.org
Sun Oct 20 13:11:39 UTC 2024


#62246: wp_print_font_faces() prints an HTML tag with an id property despite being
able to be used more than once.
---------------------------------------------+-----------------------------
 Reporter:  mmaattiiaass                     |       Owner:  SergeyBiryukov
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  6.7
Component:  Editor                           |     Version:  trunk
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59259" 59259]:
 {{{
 #!CommitTicketReference repository="" revision="59259"
 Editor: Replace `id` attribute with `class` in
 `WP_Font_Face::get_style_element()`.

 `wp_print_font_faces()` prints an HTML tag that can be used more than
 once, so the document could end up having multiple tags with the same `id`
 attribute.

 The `id` global attribute defines an identifier (ID) which must be unique
 in the whole document.

 Reference: [https://developer.mozilla.org/en-
 US/docs/Web/HTML/Global_attributes/id MDN Web Docs: id].

 Follow-up to [56500].

 Props mmaattiiaass, peterwilsoncc.
 Fixes #62246.
 }}}

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


More information about the wp-trac mailing list