Skip to:
Content

bbPress.org

Changeset 4952


Ignore:
Timestamp:
05/27/2013 07:39:27 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Escape output of translation strings where appropriate. Refresh some escaping approaches. See #1999.

Location:
trunk/includes
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/common/template-tags.php

    r4944 r4952  
    21902190                        // If capable, include a link to edit the tag
    21912191                        if ( current_user_can( 'manage_topic_tags' ) ) {
    2192                                 $tag_data[] = '<a href="' . bbp_get_topic_tag_edit_link() . '" class="bbp-edit-topic-tag-link">' . __( '(Edit)', 'bbpress' ) . '</a>';
     2192                                $tag_data[] = '<a href="' . bbp_get_topic_tag_edit_link() . '" class="bbp-edit-topic-tag-link">' . esc_attr__( '(Edit)', 'bbpress' ) . '</a>';
    21932193                        }
    21942194
    … …  
    23122312                // Search
    23132313                } elseif ( bbp_is_search() && bbp_get_search_terms() ) {
    2314                         $crumbs[] = '<a href="' . bbp_get_search_url() . '" class="bbp-breadcrumb-search">' . __( 'Search', 'bbpress' ) . '</a>';
     2314                        $crumbs[] = '<a href="' . bbp_get_search_url() . '" class="bbp-breadcrumb-search">' . esc_attr__( 'Search', 'bbpress' ) . '</a>';
    23152315                }
    23162316
    … …  
    24832483         */
    24842484        function bbp_get_logout_link( $redirect_to = '' ) {
    2485                 return apply_filters( 'bbp_get_logout_link', '<a href="' . wp_logout_url( $redirect_to ) . '" class="button logout-link">' . __( 'Log Out', 'bbpress' ) . '</a>', $redirect_to );
     2485                return apply_filters( 'bbp_get_logout_link', '<a href="' . wp_logout_url( $redirect_to ) . '" class="button logout-link">' . esc_html__( 'Log Out', 'bbpress' ) . '</a>', $redirect_to );
    24862486        }
    24872487
  • trunk/includes/forums/template-tags.php

    r4924 r4952  
    527527
    528528                if ( !empty( $time_since ) && !empty( $link_url ) )
    529                         $anchor = '<a href="' . $link_url . '" title="' . esc_attr( $title ) . '">' . $time_since . '</a>';
     529                        $anchor = '<a href="' . esc_url( $link_url ) . '" title="' . esc_attr( $title ) . '">' . esc_html( $time_since ) . '</a>';
    530530                else
    531                         $anchor = __( 'No Topics', 'bbpress' );
     531                        $anchor = esc_html__( 'No Topics', 'bbpress' );
    532532
    533533                return apply_filters( 'bbp_get_forum_freshness_link', $anchor, $forum_id, $time_since, $link_url, $title, $active_id );
    … …  
    725725
    726726                        // Build this sub forums link
    727                         $output .= $r['link_before'] . '<a href="' . $permalink . '" class="bbp-forum-link">' . $title . $counts . '</a>' . $show_sep . $r['link_after'];
     727                        $output .= $r['link_before'] . '<a href="' . esc_url( $permalink ) . '" class="bbp-forum-link">' . $title . $counts . '</a>' . $show_sep . $r['link_after'];
    728728                }
    729729
    … …  
    11241124                // First link never has view=all
    11251125                if ( bbp_get_view_all( 'edit_others_topics' ) )
    1126                         $retval .= "<a href='" . esc_url( bbp_remove_view_all( bbp_get_forum_permalink( $forum_id ) ) ) . "'>$topics</a>";
     1126                        $retval .= "<a href='" . esc_url( bbp_remove_view_all( bbp_get_forum_permalink( $forum_id ) ) ) . "'>" . esc_html( $topics ) . "</a>";
    11271127                else
    1128                         $retval .= $topics;
     1128                        $retval .= esc_html( $topics );
    11291129
    11301130                // Get deleted topics
    … …  
    11431143                        // Link
    11441144                        } else {
    1145                                 $retval .= " <a href='" . esc_url( bbp_add_view_all( bbp_get_forum_permalink( $forum_id ), true ) ) . "'>$extra</a>";
     1145                                $retval .= " <a href='" . esc_url( bbp_add_view_all( bbp_get_forum_permalink( $forum_id ), true ) ) . "'>" . esc_html( $extra ) . "</a>";
    11461146                        }
    11471147                }
    … …  
    18661866
    18671867                                if ( bbp_is_forum_category( $forum_id ) ) {
    1868                                         $retstr = sprintf( __( 'This category contains %1$s and %2$s, and was last updated by %3$s %4$s.', 'bbpress' ), $topic_text, $reply_text, $last_updated_by, $time_since );
     1868                                        $retstr = sprintf( esc_html__( 'This category contains %1$s and %2$s, and was last updated by %3$s %4$s.', 'bbpress' ), $topic_text, $reply_text, $last_updated_by, $time_since );
    18691869                                } else {
    1870                                         $retstr = sprintf( __( 'This forum contains %1$s and %2$s, and was last updated by %3$s %4$s.',    'bbpress' ), $topic_text, $reply_text, $last_updated_by, $time_since );
     1870                                        $retstr = sprintf( esc_html__( 'This forum contains %1$s and %2$s, and was last updated by %3$s %4$s.',    'bbpress' ), $topic_text, $reply_text, $last_updated_by, $time_since );
    18711871                                }
    18721872
    … …  
    18741874
    18751875                                if ( bbp_is_forum_category( $forum_id ) ) {
    1876                                         $retstr = sprintf( __( 'This category contains %1$s, and was last updated by %2$s %3$s.', 'bbpress' ), $topic_text, $last_updated_by, $time_since );
     1876                                        $retstr = sprintf( esc_html__( 'This category contains %1$s, and was last updated by %2$s %3$s.', 'bbpress' ), $topic_text, $last_updated_by, $time_since );
    18771877                                } else {
    1878                                         $retstr = sprintf( __( 'This forum contains %1$s, and was last updated by %2$s %3$s.',    'bbpress' ), $topic_text, $last_updated_by, $time_since );
     1878                                        $retstr = sprintf( esc_html__( 'This forum contains %1$s, and was last updated by %2$s %3$s.',    'bbpress' ), $topic_text, $last_updated_by, $time_since );
    18791879                                }
    18801880                        }
    … …  
    18861886
    18871887                                if ( bbp_is_forum_category( $forum_id ) ) {
    1888                                         $retstr = sprintf( __( 'This category contains %1$s and %2$s.', 'bbpress' ), $topic_text, $reply_text );
     1888                                        $retstr = sprintf( esc_html__( 'This category contains %1$s and %2$s.', 'bbpress' ), $topic_text, $reply_text );
    18891889                                } else {
    1890                                         $retstr = sprintf( __( 'This forum contains %1$s and %2$s.',    'bbpress' ), $topic_text, $reply_text );
     1890                                        $retstr = sprintf( esc_html__( 'This forum contains %1$s and %2$s.',    'bbpress' ), $topic_text, $reply_text );
    18911891                                }
    18921892
    … …  
    18961896
    18971897                                        if ( bbp_is_forum_category( $forum_id ) ) {
    1898                                                 $retstr = sprintf( __( 'This category contains %1$s.', 'bbpress' ), $topic_text );
     1898                                                $retstr = sprintf( esc_html__( 'This category contains %1$s.', 'bbpress' ), $topic_text );
    18991899                                        } else {
    1900                                                 $retstr = sprintf( __( 'This forum contains %1$s.',    'bbpress' ), $topic_text );
     1900                                                $retstr = sprintf( esc_html__( 'This forum contains %1$s.',    'bbpress' ), $topic_text );
    19011901                                        }
    19021902
    19031903                                } else {
    1904                                         $retstr = __( 'This forum is empty.', 'bbpress' );
     1904                                        $retstr = esc_html__( 'This forum is empty.', 'bbpress' );
    19051905                                }
    19061906                        }
    … …  
    21432143
    21442144                foreach( $forum_attr as $value => $label )
    2145                         $type_output .= "\t" . '<option value="' . $value . '"' . selected( bbp_get_forum_type( $forum_id ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n";
     2145                        $type_output .= "\t" . '<option value="' . esc_attr( $value ) . '"' . selected( bbp_get_forum_type( $forum_id ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n";
    21462146
    21472147                $type_output .= '</select>';
    … …  
    21812181
    21822182                foreach( $forum_attr as $value => $label )
    2183                         $status_output .= "\t" . '<option value="' . $value . '"' . selected( bbp_get_forum_status( $forum_id ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n";
     2183                        $status_output .= "\t" . '<option value="' . esc_attr( $value ) . '"' . selected( bbp_get_forum_status( $forum_id ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n";
    21842184
    21852185                $status_output .= '</select>';
    … …  
    22202220
    22212221                foreach( $forum_attr as $value => $label )
    2222                         $visibility_output .= "\t" . '<option value="' . $value . '"' . selected( bbp_get_forum_visibility( $forum_id ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n";
     2222                        $visibility_output .= "\t" . '<option value="' . esc_attr( $value ) . '"' . selected( bbp_get_forum_visibility( $forum_id ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n";
    22232223
    22242224                $visibility_output .= '</select>';
    … …  
    22852285                        }
    22862286
    2287                         $link = '<a href="' . $url . '" class="bbp-forum-rss-link topics"><span>' . __( 'Topics', 'bbpress' ) . '</span></a>';
     2287                        $link = '<a href="' . esc_url( $url ) . '" class="bbp-forum-rss-link topics"><span>' . esc_attr__( 'Topics', 'bbpress' ) . '</span></a>';
    22882288                }
    22892289
    … …  
    23492349                        }
    23502350
    2351                         $link = '<a href="' . $url . '" class="bbp-forum-rss-link replies"><span>' . __( 'Replies', 'bbpress' ) . '</span></a>';
     2351                        $link = '<a href="' . esc_url( $url ) . '" class="bbp-forum-rss-link replies"><span>' . esc_html__( 'Replies', 'bbpress' ) . '</span></a>';
    23522352                }
    23532353
  • trunk/includes/replies/template-tags.php

    r4944 r4952  
    701701                        return false;
    702702
    703                 $r = "\n\n" . '<ul id="bbp-reply-revision-log-' . $reply_id . '" class="bbp-reply-revision-log">' . "\n\n";
     703                $r = "\n\n" . '<ul id="bbp-reply-revision-log-' . esc_attr( $reply_id ) . '" class="bbp-reply-revision-log">' . "\n\n";
    704704
    705705                // Loop through revisions
    … …  
    717717                        $since  = bbp_get_time_since( bbp_convert_date( $revision->post_modified ) );
    718718
    719                         $r .= "\t" . '<li id="bbp-reply-revision-log-' . $reply_id . '-item-' . $revision->ID . '" class="bbp-reply-revision-log-item">' . "\n";
     719                        $r .= "\t" . '<li id="bbp-reply-revision-log-' . esc_attr( $reply_id ) . '-item-' . esc_attr( $revision->ID ) . '" class="bbp-reply-revision-log-item">' . "\n";
    720720                        if ( !empty( $reason ) ) {
    721                                 $r .= "\t\t" . sprintf( __( 'This reply was modified %1$s by %2$s. Reason: %3$s', 'bbpress' ), $since, $author, $reason ) . "\n";
     721                                $r .= "\t\t" . sprintf( esc_html__( 'This reply was modified %1$s by %2$s. Reason: %3$s', 'bbpress' ), esc_html( $since ), $author, esc_html( $reason ) ) . "\n";
    722722                        } else {
    723                                 $r .= "\t\t" . sprintf( __( 'This reply was modified %1$s by %2$s.', 'bbpress' ), $since, $author ) . "\n";
     723                                $r .= "\t\t" . sprintf( esc_html__( 'This reply was modified %1$s by %2$s.', 'bbpress' ), esc_html( $since ), $author ) . "\n";
    724724                        }
    725725                        $r .= "\t" . '</li>' . "\n";
    … …  
    11281128
    11291129                        // Setup title and author_links array
    1130                         $link_title   = !empty( $link_title ) ? ' title="' . $link_title . '"' : '';
     1130                        $link_title   = !empty( $link_title ) ? ' title="' . esc_attr( $link_title ) . '"' : '';
    11311131                        $author_links = array();
    11321132
    … …  
    11421142
    11431143                        // Link class
    1144                         $link_class = ' class="bbp-author-' . $r['type'] . '"';
     1144                        $link_class = ' class="bbp-author-' . esc_attr( $r['type'] ) . '"';
    11451145
    11461146                        // Add links if not anonymous
    … …  
    11501150                                foreach ( $author_links as $link => $link_text ) {
    11511151                                        $link_class = ' class="bbp-author-' . $link . '"';
    1152                                         $author_link[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', $author_url, $link_title, $link_class, $link_text );
     1152                                        $author_link[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', esc_url( $author_url ), $link_title, $link_class, $link_text );
    11531153                                }
    11541154
    … …  
    13041304                $reply_id    = bbp_get_reply_id( $r['reply_id'] );
    13051305                $role        = bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) );
    1306                 $author_role = sprintf( '%1$s<div class="%2$s">%3$s</div>%4$s', $r['before'], $r['class'], $role, $r['after'] );
     1306                $author_role = sprintf( '%1$s<div class="%2$s">%3$s</div>%4$s', $r['before'], esc_attr( $r['class'] ), esc_html( $role ), $r['after'] );
    13071307
    13081308                return apply_filters( 'bbp_get_reply_author_role', $author_role, $r );
    … …  
    15431543                $uri      = remove_query_arg( array( 'bbp_reply_to' ) );
    15441544                $uri      = add_query_arg( array( 'bbp_reply_to' => $reply->ID ) );
    1545                 $uri      = esc_url( wp_nonce_url( $uri, 'respond_id_' . $reply->ID ) );
     1545                $uri      = wp_nonce_url( $uri, 'respond_id_' . $reply->ID );
    15461546                $uri      = $uri . '#new-post';
    15471547                $onclick  = 'return addReply.moveForm("' . $r['add_below'] . '-' . $reply->ID . '","' . $reply->ID . '","' . $r['respond_id'] . '","' . $reply->post_parent . '")';
    15481548                $r['uri'] = $uri;
    1549                 $retval   = $r['link_before'] . '<a href="' . $r['uri'] . '" class="bbp-reply-to-link" onclick=' . "'{$onclick}' >" . $r['reply_text'] . '</a>' . $r['link_after'];
     1549                $retval   = $r['link_before'] . '<a href="' . esc_url( $r['uri'] ) . '" class="bbp-reply-to-link" onclick=' . "'{$onclick}' >" . esc_html( $r['reply_text'] ) . '</a>' . $r['link_after'];
    15501550
    15511551                return apply_filters( 'bbp_get_reply_to_link', $retval, $r, $args );
    … …  
    15881588                // Set visibility
    15891589                $style  = !empty( $reply_to ) ? '' : ' style="display:none;"';
    1590                 $link   = esc_url( remove_query_arg( array( 'bbp_reply_to', '_wpnonce' ) ) ) . '#post-' . $reply_to;
    1591                 $retval = '<a rel="nofollow" id="bbp-cancel-reply-to-link" href="' . $link . '"' . $style . '>' . $text . '</a>';
     1590                $link   = remove_query_arg( array( 'bbp_reply_to', '_wpnonce' ) ) . '#post-' . $reply_to;
     1591                $retval = '<a rel="nofollow" id="bbp-cancel-reply-to-link" href="' . esc_url( $link ) . '"' . $style . '>' . esc_html( $text ) . '</a>';
    15921592
    15931593                return apply_filters( 'bbp_get_cancel_reply_to_link', $retval, $link, $text );
    … …  
    18221822                        return;
    18231823
    1824                 $retval = $r['link_before'] . '<a href="' . $uri . '">' . $r['edit_text'] . '</a>' . $r['link_after'];
     1824                $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '">' . esc_html( $r['edit_text'] ) . '</a>' . $r['link_after'];
    18251825
    18261826                return apply_filters( 'bbp_get_reply_edit_link', $retval, $r );
    … …  
    20072007                $display  = bbp_is_reply_spam( $reply->ID ) ? $r['unspam_text'] : $r['spam_text'];
    20082008                $uri      = add_query_arg( array( 'action' => 'bbp_toggle_reply_spam', 'reply_id' => $reply->ID ) );
    2009                 $uri      = esc_url( wp_nonce_url( $uri, 'spam-reply_' . $reply->ID ) );
    2010                 $retval   = $r['link_before'] . '<a href="' . $uri . '">' . $display . '</a>' . $r['link_after'];
     2009                $uri      = wp_nonce_url( $uri, 'spam-reply_' . $reply->ID );
     2010                $retval   = $r['link_before'] . '<a href="' . esc_url( $uri ) . '">' . esc_html( $display ) . '</a>' . $r['link_after'];
    20112011
    20122012                return apply_filters( 'bbp_get_reply_spam_link', $retval, $r );
    … …  
    20702070                        return;
    20712071
    2072                 $uri = esc_url( add_query_arg( array(
     2072                $uri = add_query_arg( array(
    20732073                        'action'   => 'move',
    20742074                        'reply_id' => $reply_id
    2075                 ), bbp_get_reply_edit_url( $reply_id ) ) );
    2076 
    2077                 $retval = $r['link_before'] . '<a href="' . $uri . '" title="' . esc_attr( $r['split_title'] ) . '">' . esc_html( $r['split_text'] ) . '</a>' . $r['link_after'];
     2075                ), bbp_get_reply_edit_url( $reply_id ) );
     2076
     2077                $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" title="' . esc_attr( $r['split_title'] ) . '">' . esc_html( $r['split_text'] ) . '</a>' . $r['link_after'];
    20782078
    20792079                return apply_filters( 'bbp_get_reply_move_link', $retval, $r );
    … …  
    21372137                        return;
    21382138
    2139                 $uri = esc_url(
    2140                         add_query_arg(
    2141                                 array(
    2142                                         'action'   => 'split',
    2143                                         'reply_id' => $reply_id
    2144                                 ),
    2145                         bbp_get_topic_edit_url( $topic_id )
    2146                 ) );
    2147 
    2148                 $retval = $r['link_before'] . '<a href="' . $uri . '" title="' . esc_attr( $r['split_title'] ) . '">' . esc_html( $r['split_text'] ) . '</a>' . $r['link_after'];
     2139                $uri =  add_query_arg( array(
     2140                        'action'   => 'split',
     2141                        'reply_id' => $reply_id
     2142                ), bbp_get_topic_edit_url( $topic_id ) );
     2143
     2144                $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" title="' . esc_attr( $r['split_title'] ) . '">' . esc_html( $r['split_text'] ) . '</a>' . $r['link_after'];
    21492145
    21502146                return apply_filters( 'bbp_get_topic_split_link', $retval, $r );
    … …  
    22652261
    22662262                // Filter and return
    2267                 return apply_filters( 'bbp_get_topic_pagination_count', $retstr );
     2263                return apply_filters( 'bbp_get_topic_pagination_count', esc_html( $retstr ) );
    22682264        }
    22692265
  • trunk/includes/search/template-tags.php

    r4928 r4952  
    229229                // No search terms specified
    230230                if ( empty( $search_terms ) ) {
    231                         $title = __( 'Search', 'bbpress' );
     231                        $title = esc_html__( 'Search', 'bbpress' );
    232232
    233233                // Include search terms in title
    234234                } else {
    235                         $title = sprintf( __( "Search Results for '%s'", 'bbpress' ), esc_attr( $search_terms ) );
     235                        $title = sprintf( esc_html__( "Search Results for '%s'", 'bbpress' ), esc_attr( $search_terms ) );
    236236                }
    237237
    … …  
    414414
    415415                // Filter and return
    416                 return apply_filters( 'bbp_get_search_pagination_count', $retstr );
     416                return apply_filters( 'bbp_get_search_pagination_count', esc_html( $retstr ) );
    417417        }
    418418
  • trunk/includes/topics/functions.php

    r4944 r4952  
    33873387                                        <description>
    33883388                                                <![CDATA[
    3389                                                 <p><?php printf( __( 'Replies: %s', 'bbpress' ), bbp_get_topic_reply_count() ); ?></p>
     3389                                                <p><?php printf( esc_html__( 'Replies: %s', 'bbpress' ), bbp_get_topic_reply_count() ); ?></p>
    33903390                                                <?php bbp_topic_content(); ?>
    33913391                                                ]]>
  • trunk/includes/topics/template-tags.php

    r4944 r4952  
    909909                        return false;
    910910
    911                 $r = "\n\n" . '<ul id="bbp-topic-revision-log-' . $topic_id . '" class="bbp-topic-revision-log">' . "\n\n";
     911                $r = "\n\n" . '<ul id="bbp-topic-revision-log-' . esc_attr( $topic_id ) . '" class="bbp-topic-revision-log">' . "\n\n";
    912912
    913913                // Loop through revisions
    … …  
    925925                        $since  = bbp_get_time_since( bbp_convert_date( $revision->post_modified ) );
    926926
    927                         $r .= "\t" . '<li id="bbp-topic-revision-log-' . $topic_id . '-item-' . $revision->ID . '" class="bbp-topic-revision-log-item">' . "\n";
     927                        $r .= "\t" . '<li id="bbp-topic-revision-log-' . esc_attr( $topic_id ) . '-item-' . esc_attr( $revision->ID ) . '" class="bbp-topic-revision-log-item">' . "\n";
    928928                        if ( !empty( $reason ) ) {
    929                                 $r .= "\t\t" . sprintf( __( 'This topic was modified %1$s by %2$s. Reason: %3$s', 'bbpress' ), $since, $author, $reason ) . "\n";
     929                                $r .= "\t\t" . sprintf( __( 'This topic was modified %1$s by %2$s. Reason: %3$s', 'bbpress' ), esc_html( $since ), $author, esc_html( $reason ) ) . "\n";
    930930                        } else {
    931                                 $r .= "\t\t" . sprintf( __( 'This topic was modified %1$s by %2$s.', 'bbpress' ), $since, $author ) . "\n";
     931                                $r .= "\t\t" . sprintf( __( 'This topic was modified %1$s by %2$s.', 'bbpress' ), esc_html( $since ), $author ) . "\n";
    932932                        }
    933933                        $r .= "\t" . '</li>' . "\n";
    … …  
    14191419
    14201420                        // Setup title and author_links array
    1421                         $link_title   = !empty( $link_title ) ? ' title="' . $link_title . '"' : '';
     1421                        $link_title   = !empty( $link_title ) ? ' title="' . esc_attr( $link_title ) . '"' : '';
    14221422                        $author_links = array();
    14231423
    … …  
    14331433
    14341434                        // Link class
    1435                         $link_class = ' class="bbp-author-' . $r['type'] . '"';
     1435                        $link_class = ' class="bbp-author-' . esc_attr( $r['type'] ) . '"';
    14361436
    14371437                        // Add links if not anonymous
    … …  
    14401440                                // Assemble the links
    14411441                                foreach ( $author_links as $link => $link_text ) {
    1442                                         $link_class = ' class="bbp-author-' . $link . '"';
    1443                                         $author_link[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', $author_url, $link_title, $link_class, $link_text );
     1442                                        $link_class = ' class="bbp-author-' . esc_attr( $link ) . '"';
     1443                                        $author_link[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', esc_url( $author_url ), $link_title, $link_class, $link_text );
    14441444                                }
    14451445
    … …  
    21362136                // Parse arguments against default values
    21372137                $r = bbp_parse_args( $args, array(
    2138                         'before' => '<div class="bbp-topic-tags"><p>' . __( 'Tagged:', 'bbpress' ) . '&nbsp;',
     2138                        'before' => '<div class="bbp-topic-tags"><p>' . esc_html__( 'Tagged:', 'bbpress' ) . '&nbsp;',
    21392139                        'sep'    => ', ',
    21402140                        'after'  => '</p></div>'
    … …  
    27822782
    27832783                // Filter and return
    2784                 return apply_filters( 'bbp_get_topic_pagination_count', $retstr );
     2784                return apply_filters( 'bbp_get_topic_pagination_count', esc_html( $retstr ) );
    27852785        }
    27862786
    … …  
    30083008                if ( !empty( $last_reply ) ) {
    30093009                        $last_updated_by = bbp_get_author_link( array( 'post_id' => $last_reply, 'size' => $r['size'] ) );
    3010                         $retstr          = sprintf( __( 'This topic contains %1$s, has %2$s, and was last updated by %3$s %4$s.', 'bbpress' ), $reply_count, $voice_count, $last_updated_by, $time_since );
     3010                        $retstr          = sprintf( esc_html__( 'This topic contains %1$s, has %2$s, and was last updated by %3$s %4$s.', 'bbpress' ), $reply_count, $voice_count, $last_updated_by, $time_since );
    30113011
    30123012                // Topic has no replies
    30133013                } elseif ( ! empty( $voice_count ) && ! empty( $reply_count ) ) {
    3014                         $retstr = sprintf( __( 'This topic contains %1$s and has %2$s.', 'bbpress' ), $voice_count, $reply_count );
     3014                        $retstr = sprintf( esc_html__( 'This topic contains %1$s and has %2$s.', 'bbpress' ), $voice_count, $reply_count );
    30153015
    30163016                // Topic has no replies and no voices
    30173017                } elseif ( empty( $voice_count ) && empty( $reply_count ) ) {
    3018                         $retstr = sprintf( __( 'This topic has no replies.', 'bbpress' ), $voice_count, $reply_count );
     3018                        $retstr = sprintf( esc_html__( 'This topic has no replies.', 'bbpress' ), $voice_count, $reply_count );
    30193019                }
    30203020
Note: See TracChangeset for help on using the changeset viewer.