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-forum.php

    r5563 r5688  
    3232
    3333                    <?php
    34                         if ( bbp_is_forum_edit() )
    35                             printf( __( 'Now Editing &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_forum_title() );
    36                         else
    37                             bbp_is_single_forum() ? printf( __( 'Create New Forum in &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_forum_title() ) : _e( 'Create New Forum', 'bbpress' );
     34                        if ( bbp_is_forum_edit() ) :
     35                            printf( esc_html__( 'Now Editing &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_forum_title() );
     36                        else :
     37                            bbp_is_single_forum()
     38                                ? printf( esc_html__( 'Create New Forum in &ldquo;%s&rdquo;', 'bbpress' ), bbp_get_forum_title() )
     39                                : esc_html_e( 'Create New Forum', 'bbpress' );
     40                        endif;
    3841                    ?>
    3942
     
    4649                    <div class="bbp-template-notice">
    4750                        <ul>
    48                             <li><?php _e( 'This forum is closed to new content, however your account still allows you to do so.', 'bbpress' ); ?></li>
     51                            <li><?php esc_html_e( 'This forum is closed to new content, however your account still allows you to do so.', 'bbpress' ); ?></li>
    4952                        </ul>
    5053                    </div>
     
    5659                    <div class="bbp-template-notice">
    5760                        <ul>
    58                             <li><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></li>
     61                            <li><?php esc_html_e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></li>
    5962                        </ul>
    6063                    </div>
     
    6972
    7073                    <p>
    71                         <label for="bbp_forum_title"><?php printf( __( 'Forum Name (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br />
     74                        <label for="bbp_forum_title"><?php printf( esc_html__( 'Forum Name (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br />
    7275                        <input type="text" id="bbp_forum_title" value="<?php bbp_form_forum_title(); ?>" size="40" name="bbp_forum_title" maxlength="<?php bbp_title_max_length(); ?>" />
    7376                    </p>
     
    8487
    8588                        <p class="form-allowed-tags">
    86                             <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
     89                            <label><?php esc_html_e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
    8790                            <code><?php bbp_allowed_tags(); ?></code>
    8891                        </p>
     
    9396
    9497                    <p>
    95                         <label for="bbp_forum_type"><?php _e( 'Forum Type:', 'bbpress' ); ?></label><br />
     98                        <label for="bbp_forum_type"><?php esc_html_e( 'Forum Type:', 'bbpress' ); ?></label><br />
    9699                        <?php bbp_form_forum_type_dropdown(); ?>
    97100                    </p>
     
    102105
    103106                    <p>
    104                         <label for="bbp_forum_status"><?php _e( 'Status:', 'bbpress' ); ?></label><br />
     107                        <label for="bbp_forum_status"><?php esc_html_e( 'Status:', 'bbpress' ); ?></label><br />
    105108                        <?php bbp_form_forum_status_dropdown(); ?>
    106109                    </p>
     
    111114
    112115                    <p>
    113                         <label for="bbp_forum_visibility"><?php _e( 'Visibility:', 'bbpress' ); ?></label><br />
     116                        <label for="bbp_forum_visibility"><?php esc_html_e( 'Visibility:', 'bbpress' ); ?></label><br />
    114117                        <?php bbp_form_forum_visibility_dropdown(); ?>
    115118                    </p>
     
    120123
    121124                    <p>
    122                         <label for="bbp_forum_parent_id"><?php _e( 'Parent Forum:', 'bbpress' ); ?></label><br />
     125                        <label for="bbp_forum_parent_id"><?php esc_html_e( 'Parent Forum:', 'bbpress' ); ?></label><br />
    123126
    124127                        <?php
    125128                            bbp_dropdown( array(
    126129                                'select_id' => 'bbp_forum_parent_id',
    127                                 'show_none' => __( '(No Parent)', 'bbpress' ),
     130                                'show_none' => esc_html__( '(No Parent)', 'bbpress' ),
    128131                                'selected'  => bbp_get_form_forum_parent(),
    129132                                'exclude'   => bbp_get_forum_id()
     
    140143                        <?php do_action( 'bbp_theme_before_forum_form_submit_button' ); ?>
    141144
    142                         <button type="submit" id="bbp_forum_submit" name="bbp_forum_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
     145                        <button type="submit" id="bbp_forum_submit" name="bbp_forum_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>
    143146
    144147                        <?php do_action( 'bbp_theme_after_forum_form_submit_button' ); ?>
     
    164167        <div class="bbp-template-notice">
    165168            <ul>
    166                 <li><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new content.', 'bbpress' ), bbp_get_forum_title() ); ?></li>
     169                <li><?php printf( esc_html__( 'The forum &#8216;%s&#8217; is closed to new content.', 'bbpress' ), bbp_get_forum_title() ); ?></li>
    167170            </ul>
    168171        </div>
     
    174177        <div class="bbp-template-notice">
    175178            <ul>
    176                 <li><?php is_user_logged_in() ? _e( 'You cannot create new forums.', 'bbpress' ) : _e( 'You must be logged in to create new forums.', 'bbpress' ); ?></li>
     179                <li><?php is_user_logged_in()
     180                    ? esc_html_e( 'You cannot create new forums.',               'bbpress' )
     181                    : esc_html_e( 'You must be logged in to create new forums.', 'bbpress' );
     182                ?></li>
    177183            </ul>
    178184        </div>
Note: See TracChangeset for help on using the changeset viewer.