[wp-trac] [WordPress Trac] #57852: HTML API: Support RCData and Script tag closers

WordPress Trac noreply at wordpress.org
Thu Mar 2 16:40:09 UTC 2023


#57852: HTML API: Support RCData and Script tag closers
--------------------------+-----------------------------
 Reporter:  zieladam      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 This proposal is to enhance the Tag Processor for it navigate to
 `</script>`, `</textarea>`, and `</title>` tag closers:

 {{{
 $p = new WP_HTML_Tag_Processor('<script>ABC</script><p>');
 $p->next_tag();
 $p->next_tag( array( 'tag_closers' => 'visit' ) );
 $p->get_tag(); // 'script'
 }}}

 Tag closers are supported by Tag Processor. So it only makes sense to
 consistently support all of them.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57852>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list