Make WordPress Core


Ignore:
Timestamp:
02/17/2024 03:26:43 PM (8 months ago)
Author:
swissspidy
Message:

Interactivity API: Skip instead of bail out if HTML contains SVG or MATH.

Addresses an issue with server-side processing of directives when there is e.g. an SVG icon a navigation menu.

Props cbravobernal, westonruter, dmsnell, swissspidy.
Fixes #60517.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/interactivity-api/class-wp-interactivity-api.php

    r57646 r57649  
    236236            $tag_name = $p->get_tag();
    237237
     238            /*
     239             * Directives inside SVG and MATH tags are not processed,
     240             * as they are not compatible with the Tag Processor yet.
     241             * We still process the rest of the HTML.
     242             */
    238243            if ( 'SVG' === $tag_name || 'MATH' === $tag_name ) {
    239                 $unbalanced = true;
    240                 break;
     244                $p->skip_to_tag_closer();
     245                continue;
    241246            }
    242247
Note: See TracChangeset for help on using the changeset viewer.