Make WordPress Core

Ticket #33466: wpautop.diff

File wpautop.diff, 653 bytes (added by takayukister, 9 years ago)

patch for wpautop

  • wp-includes/formatting.php

     
    572572        // Optionally insert line breaks.
    573573        if ( $br ) {
    574574                // Replace newlines that shouldn't be touched with a placeholder.
    575                 $pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', '_autop_newline_preservation_helper', $pee);
     575                $pee = preg_replace_callback('/<(script|style|textarea).*?<\/\\1>/s', '_autop_newline_preservation_helper', $pee);
    576576
    577577                // Normalize <br>
    578578                $pee = str_replace( array( '<br>', '<br/>' ), '<br />', $pee );