Skip to:
Content

bbPress.org


Ignore:
Timestamp:
04/15/2015 03:06:31 PM (11 years ago)
Author:
johnjamesjacoby
Message:

General: Use sanitize_text_field() in lieu of old-bbPress style pre-escaping technique.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/forums/functions.php

    r5676 r5684  
    8787 * @uses bbp_set_current_anonymous_user_data() To set the anonymous user cookies
    8888 * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
    89  * @uses esc_attr() For sanitization
    9089 * @uses bbp_is_forum_category() To check if the forum is a category
    9190 * @uses bbp_is_forum_closed() To check if the forum is closed
     
    147146
    148147    if ( !empty( $_POST['bbp_forum_title'] ) ) {
    149         $forum_title = esc_attr( strip_tags( $_POST['bbp_forum_title'] ) );
     148        $forum_title = sanitize_text_field( $_POST['bbp_forum_title'] );
    150149    }
    151150
     
    352351 * @uses bbp_filter_anonymous_post_data() To filter anonymous data
    353352 * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}
    354  * @uses esc_attr() For sanitization
    355353 * @uses bbp_is_forum_category() To check if the forum is a category
    356354 * @uses bbp_is_forum_closed() To check if the forum is closed
     
    454452
    455453    if ( !empty( $_POST['bbp_forum_title'] ) ) {
    456         $forum_title = esc_attr( strip_tags( $_POST['bbp_forum_title'] ) );
     454        $forum_title = sanitize_text_field( $_POST['bbp_forum_title'] );
    457455    }
    458456
     
    522520    // Revision Reason
    523521    if ( !empty( $_POST['bbp_forum_edit_reason'] ) )
    524         $forum_edit_reason = esc_attr( strip_tags( $_POST['bbp_forum_edit_reason'] ) );
     522        $forum_edit_reason = sanitize_text_field( $_POST['bbp_forum_edit_reason'] );
    525523
    526524    // Update revision log
Note: See TracChangeset for help on using the changeset viewer.