Make WordPress Core

Changeset 53654


Ignore:
Timestamp:
07/05/2022 08:04:52 AM (2 years ago)
Author:
audrasjb
Message:

Menus: Use more appropriate escaping functions in class Walker_Nav_Menu_Edit.

This changeset replaces esc_attr escaping function with esc_url as it is more appropriate in the context of a link's href attribute.

Props audrasjb, aniketpatel.
Fixes #56108.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-walker-nav-menu-edit.php

    r52580 r53654  
    266266                            <?php
    267267                            /* translators: %s: Link to menu item's original object. */
    268                             printf( __( 'Original: %s' ), '<a href="' . esc_attr( $menu_item->url ) . '">' . esc_html( $original_title ) . '</a>' );
     268                            printf( __( 'Original: %s' ), '<a href="' . esc_url( $menu_item->url ) . '">' . esc_html( $original_title ) . '</a>' );
    269269                            ?>
    270270                        </p>
Note: See TracChangeset for help on using the changeset viewer.