[wp-trac] [WordPress Trac] #31214: oEmbed: Newlines within <pre> tags get removed

WordPress Trac noreply at wordpress.org
Mon Feb 2 20:22:27 UTC 2015


#31214: oEmbed: Newlines within <pre> tags get removed
--------------------------+-----------------------------
 Reporter:  cweiske       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Embeds        |    Version:  4.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 An oEmbed's HTML content gets all `\n` newlines removed through

     add_filter( 'oembed_dataparse', array($this, '_strip_newlines'), 10, 3
 );

 `WP_oEmbed::strip_newlines()` unfortunately removes every newline, even
 those within `<pre>` tags - but they are crucial there. My oEmbedded code
 pastes all only have a single line currently:
 http://fotostore.cweiske.de/screenshots/2015-02-02%20wordpress%20oembed%20newlines.png

 Please fix this method to not remove newlines within `<pre>` tags.

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


More information about the wp-trac mailing list