Opened 10 years ago
Closed 10 years ago
#30447 closed defect (bug) (fixed)
Line spacing in PREformatted text - found solution!
Reported by: | Kzrider | Owned by: | |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | Embeds | Keywords: | |
Focuses: | Cc: |
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)
Note: See
TracTickets for help on using
tickets.
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.