Support » Alpha/Beta/RC » formatting.php:shortcode_unautop() empties the post

  • WordPress 3.1-RC4 with Lazyest gallery 1.1.beta-3. Other plugins are turned off. Not sure if it is a regexp or preg_replace problem.

    Depending on one letter presence the function shortcode_unautop() empties whole post. I’ve prepared a small testcase with part of shortcode_unautop() code to reproduce this problem:

    See file http://www.andrianov.ru/wp-shortcode.tar.gz, there are two files. $pee variable has the same value as $pee in shortcode_unautop(). Other variables are derived from corresponding variables in shortcode_unautop(). Note, the difference between 2 posts is only one letter.

    $ php good.php
    Len before: 18876
    Len after: 18870
    $ php bad.php
    Len before: 18877
    Len after: 1
    $ diff good.php bad.php
    43c43
    < AAAA</p>

    > AAAAA</p>

Viewing 1 replies (of 1 total)
  • Wow, I noticed the same issue, except I couldn’t pinpoint it until I went into default-filters.php and started commenting out the filters added to the_content()… and figured out that shortcode_unautop() actually breaks the post after a certain length.

Viewing 1 replies (of 1 total)
  • The topic ‘formatting.php:shortcode_unautop() empties the post’ is closed to new replies.