Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: “escape” characters in Group forum posts


Burt Adsit
Participant

@burtadsit

Hey Mike. bp does a whole bunch of filtering before the post is sent to bbpress. About 1/2 dozen wp filters, then some bp filtering then it gets sent to bbpress. There is the bp helper plugin over on the bbpress side that does some more filtering, bbpress gets it finally and stores it. Evidently xmlrpc doesn’t want normal <> type tags so they get stripped out, replaced with [] tags instead for the trip to bbpress. To be replaced on the bbpress side with normal <> tags. Evidently we can’t have special chars such as single quotes, double quotes, ampersands and other things making the trip so bp escapes or converts them to something else for the xmlrpc trip.

When these whacky little escaped and converted chars get to bbpress they are just stored.

Viewing a bp created post in bbpress is ugly.

But we’re not in bbpress were in bp where when we send our post from bp to bbpress it gets the post from bbpress unconverts, unfilters and unescapes all that stuff to display as the post we just sent.

During this process the html markup that should be allowed like paragraphs and bold are stripped out somewhere along the line for display in bp even if they have successfully made this round trip unscathed.

Now we’re gonna talk about excerpts which have another filtering process applied to them. No we’re not. No I’m not. If you really care, which I don’t anymore, after 4 hrs of tracking this wp action, filter insanity across two pieces of software and several transport mechanisms then you could:

Comment out line: 741 in bp-core.php bp_create_excerpt()

‘strip_tags()’

Comment out line: 41 in bp-forums-filters.php bp_forums_filter_decode()

‘wp_filter_kses()’

You get excerpts in group forums and posts in group forums that look normal. You could probably copy these fns and do the approved action/filter thing. You could. I personally take great pleasure in deleting the offending lines at this point. :)

Skip to toolbar