BuddyBoss Home – Web Support Forums Plugins BuddyBoss Wall Backslashes get lost in activity wall

Viewing 8 posts - 1 through 8 (of 8 total)
  • Question

    #54774
    @antonv

    Hi in the bbpress forum I wrote following text:
    a new bbPress test $a=b\cos\alpha$

    but this gets displayed on the wall as
    a new bbPress test $a=bcosalpha$

    However when I post the same on the wall then it is displayed properly.

    Looking into the the databases it becomes clear why

    Text from bbPress is stored in wp_bp_activity as
    a new bbPress test $a=b\cos\alpha$

    whereas text entered on wall is stored as
    a new BBossWall test $a=b\\cos\\alpha$
    although typed with only one \ and subsequently also rendered with a single backslash

    Can you please issue an update, or tell me what file to modify and how, that correctly inserts the extra slashes so that the text is rendered correctly on the wall.

    Answers

    #54906
    @antonv

    Sorry guys, this is not a BuddyBoss problem but a BuddyPress Activity Stream problem.

    #54987
    @vapvarun

    Hi @antonv, BuddyPress have content filter for activity wall. You can check inside BuddyPress Support forums.
    Regards
    Varun Dubey

    #55003
    @antonv

    Hi @vapvarun, my software skills are somewhat limited. Can you point me in the right direction and give me the filter name marked as ???????????

    function my_correction_function(){ ... }
    
    add_filter("???????????", "my_correction_function")

    what I want to achieve, is that before the wall is displayed, my_correction_function() is run.

    #55070
    @vapvarun

    Hi @antonv, you can add these to your child theme functions.php

    
    remove_filter( 'bbp_new_reply_pre_content',  'bbp_filter_kses', 30 );
    remove_filter( 'bbp_new_topic_pre_content',  'bbp_filter_kses', 30 );
    remove_filter( 'bbp_new_forum_pre_content',  'bbp_filter_kses', 30 );
    remove_filter( 'bbp_edit_reply_pre_content', 'bbp_filter_kses', 30 );
    remove_filter( 'bbp_edit_topic_pre_content', 'bbp_filter_kses', 30 );
    remove_filter( 'bbp_edit_forum_pre_content', 'bbp_filter_kses', 30 );
    

    Regards
    Varun Dubey

    #56241
    @antonv

    Hi @vapvarun, thanks for that, however I do not want to change the way bbpress works, Your suggestion is changing the bbpress filters.

    I need to add something between bbpress and buddypress. That is, buddypress reads the bbpress entry, then I want to filter, and after that buddypress stores the text in the database wp_bp_activity

    #56244
    @antonv

    Hi @vapvarun, OK ignore above, I managed to solve it, found the solutions bbpress/includes/extend/activity.php

    I need to:

    add_filter('bbp_activity_topic_create_excerpt','my_own_text_filter')
    add_filter('bbp_activity_reply_create_excerpt','my_own_text_filter')
    #56245
    @vapvarun

    Great 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • The question ‘Backslashes get lost in activity wall’ is closed to new replies.