Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#30447 closed defect (bug) (fixed)

Line spacing in PREformatted text - found solution!

Reported by: Kzrider Owned by:
Priority: normal Milestone: 4.2
Component: Embeds Version: 4.0
Severity: normal Keywords:
Cc: Focuses:

Description

I've found problem, that was described but unsolved: ​http://en.forums.wordpress.com/topic/irregular-line-spacing-in-preformatted-text

Basicly when I use <pre> tag and put urls inside it, wordpress adds extra line spacing between them while displaying page:

<pre>http://some.link/
http://some.other.link/</pre>

is converted to:

<pre>http://some.link/

http://some.other.link/</pre>

The source of this is autoebeding feature. To be exact - in file class-wp-embed.php in function autoembed_callback( $match ) there is a line:

return "\n$return\n";

This is the source of problems.

I'managed to turn off autoembeding in my wordpress site but I'm not familiar with wordpress to fix it. Hopefully, someone could repair it with knowledge about source of the problem. Preferably by turning off autoemneding inside <pre> and <code> tags.

Change History (3)

#1 @dd32
12 years ago

  • Component Formatting → Embeds

Pretty sure we shouldn't try embedding URL's when in <pre> or <code> tags, Partially related is #23776 but that doesn't cover this case exactly.

#2 @SergeyBiryukov
12 years ago

  • Keywords pre autoembed removed

Seems like the latest patch on #23776 should resolve this.

#3 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review → 4.2
  • Resolution → fixed
  • Status new → closed

Fixed in [31066].

Note: See TracTickets for help on using tickets.