Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/10/2014 06:09:14 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Update to newer slashing functions, as our minimum requirement is WordPress 3.6.

Also add filters to topic-title & topic-tags form fields. See #2719.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/topics/template.php

    r5558 r5559  
    38503850        // Get _POST data
    38513851        if ( bbp_is_topic_form_post_request() && isset( $_POST['bbp_topic_title'] ) ) {
    3852             $topic_title = stripslashes( $_POST['bbp_topic_title'] );
     3852            $topic_title = wp_unslash( $_POST['bbp_topic_title'] );
    38533853
    38543854        // Get edit data
     
    38613861        }
    38623862
    3863         return apply_filters( 'bbp_get_form_topic_title', esc_attr( $topic_title ) );
     3863        return apply_filters( 'bbp_get_form_topic_title', $topic_title );
    38643864    }
    38653865
     
    38873887        // Get _POST data
    38883888        if ( bbp_is_topic_form_post_request() && isset( $_POST['bbp_topic_content'] ) ) {
    3889             $topic_content = stripslashes( $_POST['bbp_topic_content'] );
     3889            $topic_content = wp_unslash( $_POST['bbp_topic_content'] );
    38903890
    38913891        // Get edit data
     
    39343934        // Get _POST data
    39353935        if ( ( bbp_is_topic_form_post_request() || bbp_is_reply_form_post_request() ) && isset( $_POST['bbp_topic_tags'] ) ) {
    3936             $topic_tags = stripslashes( $_POST['bbp_topic_tags'] );
     3936            $topic_tags = wp_unslash( $_POST['bbp_topic_tags'] );
    39373937
    39383938        // Get edit data
     
    39903990        }
    39913991
    3992         return apply_filters( 'bbp_get_form_topic_tags', esc_attr( $topic_tags ) );
     3992        return apply_filters( 'bbp_get_form_topic_tags', $topic_tags );
    39933993    }
    39943994
     
    41484148        // Get _POST data
    41494149        if ( bbp_is_topic_form_post_request() && isset( $_POST['bbp_topic_edit_reason'] ) ) {
    4150             $topic_edit_reason = stripslashes( $_POST['bbp_topic_edit_reason'] );
     4150            $topic_edit_reason = wp_unslash( $_POST['bbp_topic_edit_reason'] );
    41514151
    41524152        // No data
Note: See TracChangeset for help on using the changeset viewer.