Make WordPress Core

Changeset 54404


Ignore:
Timestamp:
10/07/2022 01:23:02 AM (20 months ago)
Author:
desrosj
Message:

Twenty Eleven: Pass template directory URLs through esc_url().

Props alberuni-azad, sabernhardt, costdev.
Fixes #56717. See #56696.

Location:
trunk/src/wp-content/themes/twentyeleven
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/header.php

    r52013 r54404  
    5050    </title>
    5151<link rel="profile" href="https://gmpg.org/xfn/11" />
    52 <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>?ver=20190507" />
     52<link rel="stylesheet" type="text/css" media="all" href="<?php echo esc_url( get_stylesheet_uri() ); ?>?ver=20221101" />
    5353<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
    5454<!--[if lt IE 9]>
    55 <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js?ver=3.7.0" type="text/javascript"></script>
     55<script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js?ver=3.7.0" type="text/javascript"></script>
    5656<![endif]-->
    5757<?php
  • trunk/src/wp-content/themes/twentyeleven/inc/block-patterns.php

    r51483 r54404  
    4040                <div class="wp-block-columns"><!-- wp:column -->
    4141                <div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} -->
    42                 <figure class="wp-block-image size-large"><img src="' . get_template_directory_uri() . '/images/patterns/pattern-flower.jpg" alt="' . esc_attr( 'A yellow flower against a dark background.', 'twentyeleven' ) . '" /></figure>
     42                <figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/patterns/pattern-flower.jpg" alt="' . esc_attr( 'A yellow flower against a dark background.', 'twentyeleven' ) . '" /></figure>
    4343                <!-- /wp:image -->
    4444                <!-- wp:paragraph {"dropCap":true} -->
     
    118118                <div class="wp-block-columns"><!-- wp:column -->
    119119                <div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} -->
    120                 <figure class="wp-block-image size-large"><img src="' . get_template_directory_uri() . '/images/patterns/pattern-woman.jpg" alt="' . esc_attr( 'Photo of a woman.', 'twentyeleven' ) . '" /></figure>
     120                <figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/patterns/pattern-woman.jpg" alt="' . esc_attr( 'Photo of a woman.', 'twentyeleven' ) . '" /></figure>
    121121                <!-- /wp:image --></div>
    122122                <!-- /wp:column -->
Note: See TracChangeset for help on using the changeset viewer.