Skip to:
Content

Ticket #2865: 2865.01.patch

File 2865.01.patch, 2.0 KB (added by thebrandonallen, 3 years ago)
  • src/includes/common/functions.php

    diff --git src/includes/common/functions.php src/includes/common/functions.php
    index 67af13c..dc15249 100644
    function bbp_notify_topic_subscribers( $reply_id = 0, $topic_id = 0, $forum_id = 
    11061106        // Remove filters from reply content and topic title to prevent content
    11071107        // from being encoded with HTML entities, wrapped in paragraph tags, etc...
    11081108        remove_all_filters( 'bbp_get_reply_content' );
    1109         remove_all_filters( 'bbp_get_topic_title'   );
     1109        remove_all_filters( 'the_title'             );
    11101110
    11111111        // Strip tags from text and setup mail data
    1112         $topic_title   = strip_tags( bbp_get_topic_title( $topic_id ) );
    1113         $reply_content = strip_tags( bbp_get_reply_content( $reply_id ) );
     1112        $topic_title   = wp_specialchars_decode( strip_tags( bbp_get_topic_title( $topic_id ) ), ENT_QUOTES );
     1113        $reply_content = wp_specialchars_decode( strip_tags( bbp_get_reply_content( $reply_id ) ), ENT_QUOTES );
    11141114        $reply_url     = bbp_get_reply_url( $reply_id );
    11151115        $blog_name     = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    11161116
    function bbp_notify_forum_subscribers( $topic_id = 0, $forum_id = 0, $anonymous_ 
    12631263        // Remove filters from reply content and topic title to prevent content
    12641264        // from being encoded with HTML entities, wrapped in paragraph tags, etc...
    12651265        remove_all_filters( 'bbp_get_topic_content' );
    1266         remove_all_filters( 'bbp_get_topic_title'   );
     1266        remove_all_filters( 'the_title'             );
    12671267
    12681268        // Strip tags from text and setup mail data
    1269         $topic_title   = strip_tags( bbp_get_topic_title( $topic_id ) );
    1270         $topic_content = strip_tags( bbp_get_topic_content( $topic_id ) );
     1269        $topic_title   = wp_specialchars_decode( strip_tags( bbp_get_topic_title( $topic_id ) ), ENT_QUOTES );
     1270        $topic_content = wp_specialchars_decode( strip_tags( bbp_get_topic_content( $topic_id ) ), ENT_QUOTES );
    12711271        $topic_url     = get_permalink( $topic_id );
    12721272        $blog_name     = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    12731273