Skip to:
Content
Pages
Categories
Search
Top
Bottom

Make users able to use brackets in their posts


  • Shine
    Participant

    @pfshiner

    Does anyone know how to do this? It doesn’t seem to be possible on my site, and my users are getting kind of frustrated about it.

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

  • Boone Gorges
    Keymaster

    @boonebgorges

    What do you mean by brackets?
    1 ( these )
    2 { these }
    3 [ these ]
    or something else?

    What’s happening when users try to use them? And in what context are they using them, activity updates or forum posts or profile fields or what?

    And what version of BP/WP are you running? https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/when-asking-for-support/


    Shine
    Participant

    @pfshiner

    By brackets I meant inequality signs ><.
    When the members try to use them in their status uppdates, forum posts and profile fields, they simply don’t appear. I’m using WP 3.0 and BP 1.2.5.2.


    Boone Gorges
    Keymaster

    @boonebgorges

    Individual inequality signs seem to work OK.

    Are you trying to allow users to post HTML code? That’s a different beast altogether. If you want to allow them to place HTML *elements* in their status updates, etc (eg so that they can make a piece of text bold by putting strong tags around it), you’ll want to add those tags one by one to the kses filters for individual components. See, for example, buddypress/bp-activity/bp-activity-filters.php, bp_activity_filter_kses(). You can either remove that filter altogether (by dropping
    remove_filter( 'bp_get_activity_content_body', 'bp_activity_filter_kses', 1 );
    remove_filter( 'bp_get_activity_content', 'bp_activity_filter_kses', 1 );

    into a bp-custom.php or functions.php file), or you can put a filter on bp_activity_allowed_tags to allow individual tags through.

    If you’re trying to allow your users to post *code*, make sure that you include the code and pre tags in your kses filter.

    Inequality signs or ‘greater than/less than’ if you want angle brackets then you’ll need to escape them or at least the less than angle symbol.

    <
    & # 60; (no spaces)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Make users able to use brackets in their posts’ is closed to new replies.
Skip to toolbar