Make WordPress Core

Changeset 53656


Ignore:
Timestamp:
07/05/2022 02:12:06 PM (2 years ago)
Author:
desrosj
Message:

General: Properly escape home_url() links in wp_page_menu().

Props sabbirmc, tushar284, costdev.
Fixes 56148.

File:
1 edited

Legend:

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

    r53391 r53656  
    14441444            $class = 'class="current_page_item"';
    14451445        }
    1446         $menu .= '<li ' . $class . '><a href="' . home_url( '/' ) . '">' . $args['link_before'] . $text . $args['link_after'] . '</a></li>';
     1446        $menu .= '<li ' . $class . '><a href="' . esc_url( home_url( '/' ) ) . '">' . $args['link_before'] . $text . $args['link_after'] . '</a></li>';
    14471447        // If the front page is a page, add it to the exclude list.
    14481448        if ( 'page' === get_option( 'show_on_front' ) ) {
Note: See TracChangeset for help on using the changeset viewer.