Make WordPress Core

Changeset 56133

Timestamp:
07/04/2023 08:43:43 PM (13 months ago)
Author:
azaozz
Message:

HTML API: Fix a fatal error when processing malformed document with unclosed attribute.

Props: dlh, costdev, dmsnell.
Fixes: #58637.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/html-api/class-wp-html-tag-processor.php

    r55734 r56133  
    547547
    548548            // Ensure that the tag closes before the end of the document.
     549
     550
     551
     552
    549553            $tag_ends_at = strpos( $this->html, '>', $this->bytes_already_parsed );
    550554            if ( false === $tag_ends_at ) {
  • trunk/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php

    r55706 r56133  
    20402040
    20412041    /**
     2042
     2043
     2044
     2045
     2046
     2047
     2048
     2049
     2050
     2051
     2052
     2053
     2054
     2055
     2056
     2057
     2058
     2059
     2060
     2061
     2062
     2063
     2064
     2065
     2066
     2067
     2068
     2069
     2070
     2071
     2072
     2073
     2074
     2075
     2076
     2077
     2078
     2079
     2080
     2081
     2082
    20422083     * @ticket 56299
    20432084     *
Note: See TracChangeset for help on using the changeset viewer.