Make WordPress Core

Ticket #56148: 56148.patch

File 56148.patch, 800 bytes (added by tushar284, 2 years ago)

Hi @sabbirmc, thanks for pointing this out. I've attached this solution. It should get the job done. Thanks!

  • src/wp-includes/post-template.php

    diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php
    index a571f52bc8..a4b7e3159d 100644
    a b function wp_page_menu( $args = array() ) { 
    14431443                if ( is_front_page() && ! is_paged() ) {
    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' ) ) {
    14491449                        if ( ! empty( $list_args['exclude'] ) ) {