[wp-trac] [WordPress Trac] #58007: HTML API: Support comments created by invalid tag name in tag closers

WordPress Trac noreply at wordpress.org
Wed Mar 29 00:44:06 UTC 2023


#58007: HTML API: Support comments created by invalid tag name in tag closers
--------------------------------------+------------------------------
 Reporter:  dmsnell                   |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Editor                    |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------
Changes (by sabernhardt):

 * component:  General => Editor


Old description:

> Adds support to the Tag Processor for a form of HTML comment derived from
> tag closers with invalid tag names. While it's the case for tag openers
> that an invalid tag name signals the parser to treat the syntax as normal
> text, if the token encountered is a tag closer then it starts an HTML
> comment until the first `>`
>
> For example, `<3` cannot start an HTML element because no tag name can
> start with a digit. However, `</3` abides by a different rule. This
> //is// structural content and starts a comment. The comment should span
> until the first `>` in the text.
>
> GitHub PR #4256
>
> Side note: can we get a new "Component" in Trac for the "HTML API"?

New description:

 Adds support to the Tag Processor for a form of HTML comment derived from
 tag closers with invalid tag names. While it's the case for tag openers
 that an invalid tag name signals the parser to treat the syntax as normal
 text, if the token encountered is a tag closer then it starts an HTML
 comment until the first `>`

 For example, `<3` cannot start an HTML element because no tag name can
 start with a digit. However, `</3` abides by a different rule. This //is//
 structural content and starts a comment. The comment should span until the
 first `>` in the text.

 [https://github.com/WordPress/wordpress-develop/pull/4256 GitHub PR #4256]

 Side note: can we get a new "Component" in Trac for the "HTML API"?

--

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


More information about the wp-trac mailing list