[wp-trac] [WordPress Trac] #62270: Unable to set bookmark on </body> in WP_HTML_Processor
WordPress Trac
noreply at wordpress.org
Wed Oct 23 18:38:49 UTC 2024
#62270: Unable to set bookmark on </body> in WP_HTML_Processor
----------------------------+------------------------------
Reporter: westonruter | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTML API | Version: 6.4
Severity: normal | Resolution:
Keywords: has-unit-tests | Focuses:
----------------------------+------------------------------
Comment (by westonruter):
Replying to [comment:6 jonsurrell]:
> I think the only cases it would get wrong if a comment appears in the
injected HTML before other elements or non-whitespace text. Anything else
should be placed in the body element. It won't make the prettiest HTML,
but it should work 🙂
Could you elaborate? What would go wrong in this case? So let's say a
SCRIPT tag is intended to be added to the end of the `</body>`. If there
is a comment preceding the SCRIPT tag then what? The comment would be left
after `</body>` but then the SCRIPT tag and any other remaining content
would be moved up to the end of the `</body>`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62270#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list