[wp-trac] [WordPress Trac] #33466: wpautop breaks multi-line textarea content

WordPress Trac noreply at wordpress.org
Thu Aug 20 14:52:56 UTC 2015


#33466: wpautop breaks multi-line textarea content
--------------------------+-----------------------------
 Reporter:  takayukister  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Formatting    |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Applying wpautop() breaks multi-line content of textarea element because
 it replaces each newline with `<br />`. A textarea can't have HTML in its
 content.

 You can reproduce the problem with the following code:


 {{{
 $text = '<textarea name="test">Lorem ipsum dolor sit amet,
 consectetur adipisicing elit,
 sed do eiusmod tempor
 incididunt ut labore
 et dolore magna aliqua.</textarea>';

 echo wpautop( $text );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33466>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list