Make WordPress Core

Changeset 59990


Ignore:
Timestamp:
03/16/2025 08:45:08 PM (6 weeks ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Escape thumbnail URL and attributes in wp_image_editor().

Follow-up to [11965].

Props benazeer, dhruvang21, sabernhardt.
Fixes #62951.

File:
1 edited

Legend:

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

    r59202 r59990  
    294294        <div class="imgedit-thumbnail-preview-group">
    295295            <figure class="imgedit-thumbnail-preview">
    296                 <img src="<?php echo $thumb['url']; ?>" width="<?php echo $thumb_img[0]; ?>" height="<?php echo $thumb_img[1]; ?>" class="imgedit-size-preview" alt="" draggable="false" />
     296                <img src="<?php echo esc_url( $thumb['url'] ); ?>" width="<?php echo esc_attr( $thumb_img[0] ); ?>" height="<?php echo esc_attr( $thumb_img[1] ); ?>" class="imgedit-size-preview" alt="" draggable="false" />
    297297                <figcaption class="imgedit-thumbnail-preview-caption"><?php _e( 'Current thumbnail' ); ?></figcaption>
    298298            </figure>
     
    535535 *
    536536 * @ignore
    537  * @param resource|GdImage  $img   Image resource.
    538  * @param float|int         $angle Image rotation angle, in degrees.
     537 * @param resource|GdImage $img   Image resource.
     538 * @param float|int        $angle Image rotation angle, in degrees.
    539539 * @return resource|GdImage|false GD image resource or GdImage instance, false otherwise.
    540540 */
Note: See TracChangeset for help on using the changeset viewer.