I have a loop on my homepage of recent bbpress replies. In that loop I show a 30 word excerpt of the reply. All is fine except for very short posts < 30 words long, in which case attachment info shows up in the excerpt. For instance, at the end of the excerpt I get this:
Attachments:Maggie-Cooper.jpg [delete | detach]Liv-Lansdale.jpg [delete
I'm using bbp_get_reply_content() and wp_trim_words to present the content. This is only an issue for replies shorter than the excerpt length.
Any idea why this is happening, and how to fix it? This problem doesn't occur in the forum itself.