Make WordPress Core

Ticket #57143: 57143.diff

File 57143.diff, 2.3 KB (added by jaedm97, 2 years ago)

Created patch.

  • src/wp-admin/options-permalink.php

    diff --git a/src/wp-admin/options-permalink.php b/src/wp-admin/options-permalink.php
    index e3eeb83c42..7cb5379e32 100644
    a b printf( 
    333333                        <legend class="screen-reader-text"><?php _e( 'Permalink structure' ); ?></legend>
    334334                        <?php foreach ( $default_structures as $input ) : ?>
    335335                        <div class="row">
    336                                 <input id="permalink-input-<?php echo $input['id']; ?>"
    337                                         name="selection" aria-describedby="permalink-<?php echo $input['id']; ?>"
     336                                <input id="permalink-input-<?php echo esc_attr( $input['id'] ); ?>"
     337                                        name="selection" aria-describedby="permalink-<?php echo esc_attr( $input['id'] ); ?>"
    338338                                        type="radio" value="<?php echo esc_attr( $input['value'] ); ?>"
    339339                                        <?php checked( $input['value'], $permalink_structure ); ?>
    340340                                />
    341341                                <div>
    342                                         <label for="permalink-input-<?php echo $input['id']; ?>"><?php echo $input['label']; ?></label>
     342                                        <label for="permalink-input-<?php echo esc_attr( $input['id'] ); ?>"><?php echo esc_html( $input['label'] ); ?></label>
    343343                                        <p>
    344                                                 <code id="permalink-<?php echo $input['id']; ?>"><?php echo $input['example']; ?></code>
     344                                                <code id="permalink-<?php echo esc_attr( $input['id'] ); ?>"><?php echo esc_html( $input['example'] ); ?></code>
    345345                                        </p>
    346346                                </div>
    347347                        </div><!-- .row -->
    printf( 
    359359                                                        <?php _e( 'Customize permalink structure by selecting available tags' ); ?>
    360360                                                </label>
    361361                                                <span class="code">
    362                                                         <code id="permalink-custom"><?php echo $url_base; ?></code>
     362                                                        <code id="permalink-custom"><?php echo esc_url( $url_base ); ?></code>
    363363                                                        <input name="permalink_structure" id="permalink_structure"
    364364                                                                type="text" value="<?php echo esc_attr( $permalink_structure ); ?>"
    365365                                                                aria-describedby="permalink-custom" class="regular-text code"
    printf( 
    381381                                                                                data-added="<?php echo esc_attr( sprintf( $tag_added, $tag ) ); ?>"
    382382                                                                                data-removed="<?php echo esc_attr( sprintf( $tag_removed, $tag ) ); ?>"
    383383                                                                                data-used="<?php echo esc_attr( sprintf( $tag_already_used, $tag ) ); ?>">
    384                                                                                 <?php echo '%' . $tag . '%'; ?>
     384                                                                                <?php echo '%' . esc_html( $tag ) . '%'; ?>
    385385                                                                        </button>
    386386                                                                </li>
    387387                                                        <?php endforeach; ?>