Skip to:
Content

bbPress.org


Ignore:
Timestamp:
04/19/2015 04:27:37 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Templates: Escape all gettext output in default template parts. See #1999.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/templates/default/bbpress/form-user-edit.php

    r5660 r5688  
    1212<form id="bbp-your-profile" action="<?php bbp_user_profile_edit_url( bbp_get_displayed_user_id() ); ?>" method="post" enctype="multipart/form-data">
    1313
    14     <h2 class="entry-title"><?php _e( 'Name', 'bbpress' ) ?></h2>
     14    <h2 class="entry-title"><?php esc_html_e( 'Name', 'bbpress' ) ?></h2>
    1515
    1616    <?php do_action( 'bbp_user_edit_before' ); ?>
    1717
    1818    <fieldset class="bbp-form">
    19         <legend><?php _e( 'Name', 'bbpress' ) ?></legend>
     19        <legend><?php esc_html_e( 'Name', 'bbpress' ) ?></legend>
    2020
    2121        <?php do_action( 'bbp_user_edit_before_name' ); ?>
    2222
    2323        <div>
    24             <label for="first_name"><?php _e( 'First Name', 'bbpress' ) ?></label>
     24            <label for="first_name"><?php esc_html_e( 'First Name', 'bbpress' ) ?></label>
    2525            <input type="text" name="first_name" id="first_name" value="<?php bbp_displayed_user_field( 'first_name', 'edit' ); ?>" class="regular-text" />
    2626        </div>
    2727
    2828        <div>
    29             <label for="last_name"><?php _e( 'Last Name', 'bbpress' ) ?></label>
     29            <label for="last_name"><?php esc_html_e( 'Last Name', 'bbpress' ) ?></label>
    3030            <input type="text" name="last_name" id="last_name" value="<?php bbp_displayed_user_field( 'last_name', 'edit' ); ?>" class="regular-text" />
    3131        </div>
    3232
    3333        <div>
    34             <label for="nickname"><?php _e( 'Nickname', 'bbpress' ); ?></label>
     34            <label for="nickname"><?php esc_html_e( 'Nickname', 'bbpress' ); ?></label>
    3535            <input type="text" name="nickname" id="nickname" value="<?php bbp_displayed_user_field( 'nickname', 'edit' ); ?>" class="regular-text" />
    3636        </div>
    3737
    3838        <div>
    39             <label for="display_name"><?php _e( 'Display Name', 'bbpress' ) ?></label>
     39            <label for="display_name"><?php esc_html_e( 'Display Name', 'bbpress' ) ?></label>
    4040
    4141            <?php bbp_edit_user_display_name(); ?>
     
    4747    </fieldset>
    4848
    49     <h2 class="entry-title"><?php _e( 'Contact Info', 'bbpress' ) ?></h2>
     49    <h2 class="entry-title"><?php esc_html_e( 'Contact Info', 'bbpress' ) ?></h2>
    5050
    5151    <fieldset class="bbp-form">
    52         <legend><?php _e( 'Contact Info', 'bbpress' ) ?></legend>
     52        <legend><?php esc_html_e( 'Contact Info', 'bbpress' ) ?></legend>
    5353
    5454        <?php do_action( 'bbp_user_edit_before_contact' ); ?>
    5555
    5656        <div>
    57             <label for="url"><?php _e( 'Website', 'bbpress' ) ?></label>
     57            <label for="url"><?php esc_html_e( 'Website', 'bbpress' ) ?></label>
    5858            <input type="text" name="url" id="url" value="<?php bbp_displayed_user_field( 'user_url', 'edit' ); ?>" class="regular-text code" />
    5959        </div>
     
    7272    </fieldset>
    7373
    74     <h2 class="entry-title"><?php bbp_is_user_home_edit() ? _e( 'About Yourself', 'bbpress' ) : _e( 'About the user', 'bbpress' ); ?></h2>
     74    <h2 class="entry-title"><?php bbp_is_user_home_edit()
     75        ? esc_html_e( 'About Yourself', 'bbpress' )
     76        : esc_html_e( 'About the user', 'bbpress' );
     77    ?></h2>
    7578
    7679    <fieldset class="bbp-form">
    77         <legend><?php bbp_is_user_home_edit() ? _e( 'About Yourself', 'bbpress' ) : _e( 'About the user', 'bbpress' ); ?></legend>
     80        <legend><?php bbp_is_user_home_edit()
     81            ? esc_html_e( 'About Yourself', 'bbpress' )
     82            : esc_html_e( 'About the user', 'bbpress' );
     83        ?></legend>
    7884
    7985        <?php do_action( 'bbp_user_edit_before_about' ); ?>
    8086
    8187        <div>
    82             <label for="description"><?php _e( 'Biographical Info', 'bbpress' ); ?></label>
     88            <label for="description"><?php esc_html_e( 'Biographical Info', 'bbpress' ); ?></label>
    8389            <textarea name="description" id="description" rows="5" cols="30"><?php bbp_displayed_user_field( 'description', 'edit' ); ?></textarea>
    8490        </div>
     
    8894    </fieldset>
    8995
    90     <h2 class="entry-title"><?php _e( 'Account', 'bbpress' ) ?></h2>
     96    <h2 class="entry-title"><?php esc_html_e( 'Account', 'bbpress' ) ?></h2>
    9197
    9298    <fieldset class="bbp-form">
    93         <legend><?php _e( 'Account', 'bbpress' ) ?></legend>
     99        <legend><?php esc_html_e( 'Account', 'bbpress' ) ?></legend>
    94100
    95101        <?php do_action( 'bbp_user_edit_before_account' ); ?>
    96102
    97103        <div>
    98             <label for="user_login"><?php _e( 'Username', 'bbpress' ); ?></label>
     104            <label for="user_login"><?php esc_html_e( 'Username', 'bbpress' ); ?></label>
    99105            <input type="text" name="user_login" id="user_login" value="<?php bbp_displayed_user_field( 'user_login', 'edit' ); ?>" disabled="disabled" class="regular-text" />
    100106        </div>
    101107
    102108        <div>
    103             <label for="email"><?php _e( 'Email', 'bbpress' ); ?></label>
     109            <label for="email"><?php esc_html_e( 'Email', 'bbpress' ); ?></label>
    104110            <input type="text" name="email" id="email" value="<?php bbp_displayed_user_field( 'user_email', 'edit' ); ?>" class="regular-text" />
    105111        </div>
    106112
    107113        <div id="password">
    108             <label for="pass1"><?php _e( 'New Password', 'bbpress' ); ?></label>
     114            <label for="pass1"><?php esc_html_e( 'New Password', 'bbpress' ); ?></label>
    109115            <fieldset class="bbp-form password">
    110116                <input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" />
    111                 <span class="description"><?php _e( 'If you would like to change the password type a new one. Otherwise leave this blank.', 'bbpress' ); ?></span>
     117                <span class="description"><?php esc_html_e( 'If you would like to change the password type a new one. Otherwise leave this blank.', 'bbpress' ); ?></span>
    112118
    113119                <input type="password" name="pass2" id="pass2" size="16" value="" autocomplete="off" />
    114                 <span class="description"><?php _e( 'Type your new password again.', 'bbpress' ); ?></span><br />
     120                <span class="description"><?php esc_html_e( 'Type your new password again.', 'bbpress' ); ?></span><br />
    115121
    116122                <div id="pass-strength-result"></div>
    117                 <span class="description indicator-hint"><?php _e( 'Your password should be at least ten characters long. Use upper and lower case letters, numbers, and symbols to make it even stronger.', 'bbpress' ); ?></span>
     123                <span class="description indicator-hint"><?php esc_html_e( 'Your password should be at least ten characters long. Use upper and lower case letters, numbers, and symbols to make it even stronger.', 'bbpress' ); ?></span>
    118124            </fieldset>
    119125        </div>
     
    125131    <?php if ( current_user_can( 'edit_users' ) && ! bbp_is_user_home_edit() ) : ?>
    126132
    127         <h2 class="entry-title"><?php _e( 'User Role', 'bbpress' ) ?></h2>
     133        <h2 class="entry-title"><?php esc_html_e( 'User Role', 'bbpress' ) ?></h2>
    128134
    129135        <fieldset class="bbp-form">
    130             <legend><?php _e( 'User Role', 'bbpress' ); ?></legend>
     136            <legend><?php esc_html_e( 'User Role', 'bbpress' ); ?></legend>
    131137
    132138            <?php do_action( 'bbp_user_edit_before_role' ); ?>
     
    135141
    136142                <div>
    137                     <label for="super_admin"><?php _e( 'Network Role', 'bbpress' ); ?></label>
     143                    <label for="super_admin"><?php esc_html_e( 'Network Role', 'bbpress' ); ?></label>
    138144                    <label>
    139145                        <input class="checkbox" type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( bbp_get_displayed_user_id() ) ); ?> />
    140                         <?php _e( 'Grant this user super admin privileges for the Network.', 'bbpress' ); ?>
     146                        <?php esc_html_e( 'Grant this user super admin privileges for the Network.', 'bbpress' ); ?>
    141147                    </label>
    142148                </div>
     
    155161
    156162    <fieldset class="submit">
    157         <legend><?php _e( 'Save Changes', 'bbpress' ); ?></legend>
     163        <legend><?php esc_html_e( 'Save Changes', 'bbpress' ); ?></legend>
    158164        <div>
    159165
    160166            <?php bbp_edit_user_form_fields(); ?>
    161167
    162             <button type="submit" id="bbp_user_edit_submit" name="bbp_user_edit_submit" class="button submit user-submit"><?php bbp_is_user_home_edit() ? _e( 'Update Profile', 'bbpress' ) : _e( 'Update User', 'bbpress' ); ?></button>
     168            <button type="submit" id="bbp_user_edit_submit" name="bbp_user_edit_submit" class="button submit user-submit"><?php bbp_is_user_home_edit()
     169                ? esc_html_e( 'Update Profile', 'bbpress' )
     170                : esc_html_e( 'Update User',    'bbpress' );
     171            ?></button>
    163172        </div>
    164173    </fieldset>
Note: See TracChangeset for help on using the changeset viewer.