WordPress.org

Ready to get started?Download WordPress

Forums

formatting.php:shortcode_unautop() empties the post (2 posts)

  1. a.andrianov
    Member
    Posted 3 years ago #

    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>

  2. CrazySerb
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic