BuddyBoss Home – Web Support Forums General BuddyPress (general issues) Backslash Added to Apostrophe Issue

Viewing 1 post (of 1 total)
  • Question


    When posting any activity that includes an apostrophe, the site includes a backslash before the apostrophe when writing to the database. For example, “don't” writes and reads as “don\'t”

    I have magic_quotes turned off in php.ini and I added the following action to the child theme functions.php. I still can't get rid of the unwanted backslash.

    Any advice appreciated.

    The action is as follows…

    add_filter( 'get_topic_title', 'strip_the_title_slashes', 20, 2);
    function strip_the_title_slashes( $title, $id ) {
    return stripslashes( $title );
    add_filter( 'get_post_text', 'strip_the_text_slashes', 20, 2);
    function strip_the_text_slashes( $text, $id ) {
    return stripslashes( $text );
Viewing 1 post (of 1 total)
  • The question ‘Backslash Added to Apostrophe Issue’ is closed to new replies.