Skip to:
Content
Pages
Categories
Search
Top
Bottom

some problem with code in postings


  • Olaf Lederer
    Member

    @finalwebsites

    Hi,

    according this post form I have to put code between “Backticks”.

    This will not work (at least on my website), if I use the backticks most from the post will disappear. To show code I use the “code” html element, this works fine until I edit the post after submission. bbpress will replace the code tags with backticks.

    Is this a bug or a php limit? (I remember me somthing with the backticks and php)

Viewing 6 replies - 1 through 6 (of 6 total)
  • It’s a bug.

    I’ma guess you have Allow Images? At least for me, without AI backticks work fine, with AI they don’t – I guess one of the code handling functions is broken by AI.


    Olaf Lederer
    Member

    @finalwebsites

    Thanks for pointing me on this, I will check the code from this plugin.

    btw. is there some plugin to use bb code instead of html elements?


    Olaf Lederer
    Member

    @finalwebsites

    deactivating the AI plugin is the solution here…


    kehlers
    Member

    @kehlers

    I had this same issue, and I really like having images, so I looked into the code. I am not very savvy about reg expressions, so but if I comment out line 29 ($text = preg_replace("|(.*?)|se", "'<code>' . encodeit('$1') . '</code>'", $text);) from the allow_images_encode_bad function of the plugin, everything seems to work.

    Does anyone know if I need that line for anything else? I don’t want to open my site up to hackers or some such thing.


    adrianshort
    Member

    @adrianshort

    I’ve had the same problem and have also “fixed” it by disabling the Allow Images plugin.

    I’m going to give the BBcode plugin a go, though if bbPress isn’t going to implement a rich text editor (and I don’t think it should) then a far better solution would be to use a lightweight markup system like Textile and/or Markdown.

    I ‘fixed’ it by commenting out the following lines:

    // remove_filter( 'pre_post', 'encode_bad' );
    // add_filter( 'pre_post', 'allow_images_encode_bad', 9 );
    // add_filter( 'pre_post', 'allow_images', 52 );

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

You must be logged in to reply to this topic.