Make WordPress Core


Ignore:
Timestamp:
03/19/2022 08:30:01 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use esc_url() instead of esc_attr() for some URLs.

Follow-up to [2063], [2182], [4656], [6952], [9098], [11109], [11204], [17887], [22505],

Props kebbet.
See #54728.

File:
1 edited

Legend:

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

    r52837 r52957  
    394394    $class = apply_filters( 'get_image_tag_class', $class, $id, $align, $size );
    395395
    396     $html = '<img src="' . esc_attr( $img_src ) . '" alt="' . esc_attr( $alt ) . '" ' . $title . $hwstring . 'class="' . $class . '" />';
     396    $html = '<img src="' . esc_url( $img_src ) . '" alt="' . esc_attr( $alt ) . '" ' . $title . $hwstring . 'class="' . $class . '" />';
    397397
    398398    /**
Note: See TracChangeset for help on using the changeset viewer.