Post content not processed correctly
-
Linebreaks in the raw download post content are converted to
<br>
instead of<p>
.As an example the post content created in TinyMCE
My first paragraph. My second paragraph. My third paragraph.
is rendered on the site as
html My first paragraph.<br> <br> My second paragraph.<br> <br> My third paragraph.<br>
but should be
html <p>My first paragraph.</p> <p>My second paragraph.</p> <p>My third paragraph.</p>
In addition
br
s are also added in lists, which leads to an empty line after each list item. The html:html <ul> <li>one</li> <li>two</li> <li>three</li> </ul>
is rendered as
html <ul><br> <li>one</li><br> <li>two</li><br> <li>three</li><br> </ul><br>
This was quite surprising and killed the design of the theme.
—
The fix is to use
wpautop
in favour ofnl2br
. In shortcodes.php on line 254 it should be:wp_kses_post( wpautop( $download_text ) )
The same is in line 568.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Post content not processed correctly’ is closed to new replies.