[wp-trac] [WordPress Trac] #62036: HTML API: Introduce normalization methods.
WordPress Trac
noreply at wordpress.org
Fri Sep 20 20:22:14 UTC 2024
#62036: HTML API: Introduce normalization methods.
--------------------------------------+---------------------
Reporter: dmsnell | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.7
Component: HTML API | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Comment (by dmsnell):
In [changeset:"59075" 59075]:
{{{
#!CommitTicketReference repository="" revision="59075"
HTML API: Add `get_full_comment_text()` method.
Previously, there were a few cases where the modifiable text read from an
HTML comment differs slightly from the parsed value of its inner text in a
browser. This is due to the specific way that invalid HTML syntax tokens
become "bogus comments."
This patch introduces a new method to the Tag Processor to allow
differentiating these specific cases, such as when copying or serializing
HTML from one source to another. Similar code has already been in use in
the html5lib tests, and this patch simplifies the test runner, evidencing
the fact that this method was already needed.
Developed in https://github.com/wordpress/wordpress-develop/pull/7342
Discussed in https://core.trac.wordpress.org/ticket/62036
Props dmsnell, jonsurrell.
See #62036.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62036#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list