Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] BuddyPress is eating my backslash !!!


  • Sniper Kitten
    Participant

    @sniperkitten

    I noticed that when I tried to post something with a backslash in the group forum, BuddyPress will prevent it from being displayed. For example, if I type:

    
    \begin{align}
    a_1& =b_1+c_1\\
    a_2& =b_2+c_2-d_2+e_2
    \end{align}
    

    It will show up as:

    
    begin{align}
    a_1& =b_1+c_1
    a_2& =b_2+c_2-d_2+e_2
    end{align}
    

    Since I’m using Mathjax to display maths equation, the lack of backslash broke the whole rendering. Using the ASCII method [by using & # 9 2 ; as backslash (without the white space) ] works but it’s more likely to annoy the user and not practical.

    Oddly enough, I don’t have this problem in a normal post, comment or bbpress forum. Can someone explain why it’s happening??

    Added after a few second:
    I noticed that BuddyPress support forum is also eating my backslashes and I have to use the ASCII method to display the backslash……

Viewing 3 replies - 1 through 3 (of 3 total)

  • Sniper Kitten
    Participant

    @sniperkitten

    Anyone??


    danbpfr
    Participant

    @chouf1

    hello,

    put this into your child theme functions.php:

    remove_filter( 'bp_get_the_topic_post_content', 'stripslashes_deep' );
    remove_filter( 'bp_get_the_topic_latest_post_excerpt', 'stripslashes_deep' );

    danbpfr
    Participant

    @chouf1

    First, if you use code on your topics, use the syntax highlighter evolved plugin.
    Than you can – If you don’t want to remove the filters – type 3 slashes instead of only one. Two will be stripped and one will appear. Depends on what you (and your users) exactly need to do. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] BuddyPress is eating my backslash !!!’ is closed to new replies.
Skip to toolbar