Make WordPress Core


Ignore:
Timestamp:
08/06/2024 08:41:58 PM (23 months ago)
Author:
dmsnell
Message:

HTML API: Truncated funky comments should cause the Tag Processor to pause.

A state change was missing in the Tag Processor when the input is too short to
find a comment closer after an opened funky comment. This patch fixes a issue
where </# does not correctly report incomplete input, but </# does.

Developed in https://github.com/wordpress/wordpress-develop/pull/7146
Discussed in https://core.trac.wordpress.org/ticket/61831

Props: jonsurrell.
Fixes #61831.

File:
1 edited

Legend:

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

    r58845 r58858  
    19101910                // No chance of finding a closer.
    19111911                if ( $at + 3 > $doc_length ) {
     1912                    $this->parser_state = self::STATE_INCOMPLETE_INPUT;
     1913
    19121914                    return false;
    19131915                }
Note: See TracChangeset for help on using the changeset viewer.