Skip to:
Content

bbPress.org


Ignore:
Timestamp:
04/19/2015 04:27:37 PM (11 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-reply.php

    r5563 r5688  
    3535                    <div class="bbp-template-notice">
    3636                        <ul>
    37                             <li><?php _e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></li>
     37                            <li><?php esc_html_e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></li>
    3838                        </ul>
    3939                    </div>
     
    4545                    <div class="bbp-template-notice">
    4646                        <ul>
    47                             <li><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></li>
     47                            <li><?php esc_html_e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></li>
    4848                        </ul>
    4949                    </div>
     
    6666
    6767                        <p class="form-allowed-tags">
    68                             <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
     68                            <label><?php esc_html_e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
    6969                            <code><?php bbp_allowed_tags(); ?></code>
    7070                        </p>
     
    7777
    7878                        <p>
    79                             <label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br />
     79                            <label for="bbp_topic_tags"><?php esc_html_e( 'Tags:', 'bbpress' ); ?></label><br />
    8080                            <input type="text" value="<?php bbp_form_topic_tags(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> />
    8181                        </p>
     
    9595                            <?php if ( bbp_is_reply_edit() && ( bbp_get_reply_author_id() !== bbp_get_current_user_id() ) ) : ?>
    9696
    97                                 <label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
     97                                <label for="bbp_topic_subscription"><?php esc_html_e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
    9898
    9999                            <?php else : ?>
    100100
    101                                 <label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
     101                                <label for="bbp_topic_subscription"><?php esc_html_e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
    102102
    103103                            <?php endif; ?>
     
    116116
    117117                            <p class="form-reply-to">
    118                                 <label for="bbp_reply_to"><?php _e( 'Reply To:', 'bbpress' ); ?></label><br />
     118                                <label for="bbp_reply_to"><?php esc_html_e( 'Reply To:', 'bbpress' ); ?></label><br />
    119119                                <?php bbp_reply_to_dropdown(); ?>
    120120                            </p>
     
    125125
    126126                            <p>
    127                                 <label for="bbp_reply_status"><?php _e( 'Reply Status:', 'bbpress' ); ?></label><br />
     127                                <label for="bbp_reply_status"><?php esc_html_e( 'Reply Status:', 'bbpress' ); ?></label><br />
    128128                                <?php bbp_form_reply_status_dropdown(); ?>
    129129                            </p>
     
    140140                                <legend>
    141141                                    <input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> />
    142                                     <label for="bbp_log_reply_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />
     142                                    <label for="bbp_log_reply_edit"><?php esc_html_e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />
    143143                                </legend>
    144144
    145145                                <div>
    146                                     <label for="bbp_reply_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
     146                                    <label for="bbp_reply_edit_reason"><?php printf( esc_html__( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
    147147                                    <input type="text" value="<?php bbp_form_reply_edit_reason(); ?>" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" />
    148148                                </div>
     
    163163                        <?php bbp_cancel_reply_to_link(); ?>
    164164
    165                         <button type="submit" id="bbp_reply_submit" name="bbp_reply_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
     165                        <button type="submit" id="bbp_reply_submit" name="bbp_reply_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>
    166166
    167167                        <?php do_action( 'bbp_theme_after_reply_form_submit_button' ); ?>
     
    187187        <div class="bbp-template-notice">
    188188            <ul>
    189                 <li><?php printf( __( 'The topic &#8216;%s&#8217; is closed to new replies.', 'bbpress' ), bbp_get_topic_title() ); ?></li>
     189                <li><?php printf( esc_html__( 'The topic &#8216;%s&#8217; is closed to new replies.', 'bbpress' ), bbp_get_topic_title() ); ?></li>
    190190            </ul>
    191191        </div>
     
    197197        <div class="bbp-template-notice">
    198198            <ul>
    199                 <li><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></li>
     199                <li><?php printf( esc_html__( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></li>
    200200            </ul>
    201201        </div>
     
    207207        <div class="bbp-template-notice">
    208208            <ul>
    209                 <li><?php is_user_logged_in() ? _e( 'You cannot reply to this topic.', 'bbpress' ) : _e( 'You must be logged in to reply to this topic.', 'bbpress' ); ?></li>
     209                <li><?php is_user_logged_in()
     210                    ? esc_html_e( 'You cannot reply to this topic.',               'bbpress' )
     211                    : esc_html_e( 'You must be logged in to reply to this topic.', 'bbpress' );
     212                ?></li>
    210213            </ul>
    211214        </div>
Note: See TracChangeset for help on using the changeset viewer.