Make WordPress Core

Changes between Initial Version and Version 3 of Ticket #58637


Ignore:
Timestamp:
06/27/2023 02:34:45 AM (23 months ago)
Author:
dlh
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58637

    • Property Keywords has-unit-tests needs-patch added
  • Ticket #58637 – Description

    initial v3  
    1313`ValueError: strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)`
    1414
     15in `WP_HTML_Tag_Processor::next_tag()`: https://github.com/WordPress/wordpress-develop/blob/12ed5ccb0a61cf684682a94e9b9c02dd11bb7d75/src/wp-includes/html-api/class-wp-html-tag-processor.php#L549
     16
    1517I've added a test case in the linked Pull Request. I think I can see that the error occurs because `WP_HTML_Tag_Processor::parse_next_attribute()` sets `$bytes_already_parsed` to one byte after the end of the document, representing the missing closing quote of the attribute. But I'm less sure about where in the processor a fix for the problem might go, so I've left that open for comment for now.
    1618