Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress/WordPress Integration – There ARE Problems

  • All,

    I’ve posted a few things on the forums about odd behavior I’ve seen – href attributes in a tags getting stripped, slashes not getting stripped, etc.

    I’ve confirmed that these problems are due to the WordPress integration. I am running WordPress 2.1 and bbPress 0.75 and followed the documentation to do the integration.

    When I stop loading wp-config in my bbPress config, the slashes get removed and href attributes stay in posts.

    I’m still digging, but part of this problem is overlap between WordPress and bbPress. The docs talk about a constant WP_BB that tells the code there are possibly conflicting APIs out there. Setting it causes bbPress to use the kses code from WordPress instead. WordPress 2.1 uses kses v0.2.2 while bbPress ships with v0.2.1. My guess is something changed between the two that bbPress doesn’t handle.

    As for the slashes in front of apostrophes, it MAY be part of it – I’m not sure yet if kses is used to strip slashes. I didn’t think kses got called except during posting, not during viewing. There is another library from WordPress that bbPress uses in integration mode (l10n) for localization – not sure if this is involved in anyway (doubt it)

    So if you’re seeing weird behavior – it may very well be intergation. But the good news is it doesn’t seem to be overly difficult to fix. Still digging to find the ‘right’ way (though as a hack for the slash problem, you can include a stripslashes call in template-functions:

    function get_post_text() {

    global $bb_post;

    // Hack to strip slashes until WordPress integration is fixed

    return stripslashes($bb_post->post_text);

    }

    Anyway – just an FYI. I’ll dig more into the kses href issue and post if I find anything.

Viewing 1 replies (of 1 total)
  • This is bizarre. If bbPress integrated is using the WordPress version of kses, you’d think the same problem with href disappearing would happen in WordPress too, but it doesn’t. I’m still digging, but this is really puzzling.

    I have confirmed, however, that ALL attributes are being stripped that should be allowed. href, rel, cite in blockquote, etc.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar