Skip to:
Content
Pages
Categories
Search
Top
Bottom

Usernames with Apostrophe Causes Slashes in Members Widget


  • Korhan Ekinci
    Participant

    @korhanekinci

    I have a problem with member widget, username of someone contains apostrophe. I am guessing the problem is in bp-core-templatetags.php file and this line:

    function bp_the_site_member_name() {

    echo apply_filters( ‘bp_the_site_member_name’, bp_get_the_site_member_name() );

    }

    What needs to be hacked here to solve the problem?

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

  • Rohan Kapoor
    Participant

    @rohan_kapoor

    THe same happens with bbPress. At this point there is no solution.


    Korhan Ekinci
    Participant

    @korhanekinci

    Ok solved the problem by adding “stripslashes”, here is the hack to bp-core-templatetags.php file:

    function bp_get_the_site_member_name() {

    global $site_members_template;

    return stripslashes( apply_filters( ‘bp_get_the_site_member_name’, $site_members_template->member->fullname ));

    }

    add_filter( ‘bp_get_the_site_member_name’, ‘wp_filter_kses’ );

    @Rohan Kapoor, I solved the bbpress part by hacking the bb-includes/template-functions.php file:

    function get_post_text() {

    global $bb_post;

    return stripslashes($bb_post->post_text);

    }

    And

    return stripslashes(apply_filters( ‘get_topic_title’, $topic->topic_title, $id ));

    Hope this helps people with similar problems.


    Jeff Sayre
    Participant

    @jeffsayre

    Korhan-

    Please report this as a bug in trac by creating a new ticket. You login to trac with the same credentials you use to log into this site.


    Korhan Ekinci
    Participant

    @korhanekinci

    Jeff, all is done. Ticket #906


    Jeff Sayre
    Participant

    @jeffsayre

    Korhan, great! Thank you!


    Rohan Kapoor
    Participant

    @rohan_kapoor

    Thanks a lot for that fix!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Usernames with Apostrophe Causes Slashes in Members Widget’ is closed to new replies.
Skip to toolbar