Make WordPress Core


Ignore:
Timestamp:
01/23/2025 06:35:15 PM (5 months ago)
Author:
jorbin
Message:

HTML API: Expect closer on foreign content void lookalike elements.

Ensure that expects_closer returns false on tags that look like void HTML tags, but are actually not void tags in foreign content.

Reviewed by westonruter, jorbin.
Merges [59392] to the 6.7 branch.

Props jonsurrell, bernhard-reiter.
Fixes #62363.

Location:
branches/6.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.7

  • branches/6.7/src/wp-includes/html-api/class-wp-html-processor.php

    r59535 r59694  
    805805            'html' === $token_name ||
    806806            // Void elements.
    807             self::is_void( $token_name ) ||
     807            ( 'html' === $token_namespace && self::is_void( $token_name ) ) ||
    808808            // Special atomic elements.
    809809            ( 'html' === $token_namespace && in_array( $token_name, array( 'IFRAME', 'NOEMBED', 'NOFRAMES', 'SCRIPT', 'STYLE', 'TEXTAREA', 'TITLE', 'XMP' ), true ) ) ||
Note: See TracChangeset for help on using the changeset viewer.