Make WordPress Core


Ignore:
Timestamp:
10/07/2026 12:09:35 AM (5 weeks ago)
Author:
peterwilsoncc
Message:

General: Bump the pinned hash for Gutenberg to 954fe7f9e04.

This updates the pinned commit hash of the Gutenberg repository from 5715a61334c4d29f21b67cf34b46061dc1b62502 to 954fe7f9e04631c41aec4552acd627a7203a2aad (version 24.1.0).

A full list of changes included in this commit can be found on GitHub: ​https://github.com/WordPress/gutenberg/compare/50ad79ef7ebc5f1d2a75def068887e33a15f2634...954fe7f9e04631c41aec4552acd627a7203a2aad.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/14045.

Props wildworks.
Fixes #66254.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/image.php

    r62738 r64223  
    291291
    292292        // Adds a button alongside image in the body content.
     293        // Extract the img tag using preg_match for structured access.
    293294        $img = null;
    294295        preg_match( '/<img[^>]+>/', $body_content, $img );
    295296
    296         $button =
    297                 $img[0]
    298                 . '<button
     297        if ( isset( $img[0] ) ) {
     298                $button_html = '<button
    299299                        class="lightbox-trigger"
    300300                        type="button"
    … …  
    311311                </button>';
    312312
    313         $body_content = preg_replace( '/<img[^>]+>/', $button, $body_content );
     313                // Build the replacement: img tag + button.
     314                // Use str_replace for literal replacement instead of preg_replace to avoid
     315                // PCRE backreference interpretation of $ and \ sequences in user-controlled
     316                // image attributes (e.g., alt="Just $5 today").
     317                $button       = $img[0] . $button_html;
     318                $body_content = str_replace( $img[0], $button, $body_content );
     319        }
    314320
    315321        add_action( 'wp_footer', 'block_core_image_print_lightbox_overlay' );
Note: See TracChangeset for help on using the changeset viewer.