• 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 brs 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 of nl2br. 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)
  • Plugin Author mkscripts

    (@mkscripts)

    Thank you for noticing! We’ve listed it for the next update.

    It may take a while for the new update to be released. For the meantime, you can change this line in shortcodes.php. This will then be overwritten with the final version during the update.

    If you have any more suggestions or questions, please let us know ??

    Kind regards,
    Team Download After Email

    Plugin Author mkscripts

    (@mkscripts)

    On second thoughts, this change will not be made in the next update. We are also working on a major update related to the implementation of Gutenberg functionality, which will include this change (wpautop) in a way that the existing download forms will be changed as little as possible.

    Kind regards,
    Team Download After Email

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post content not processed correctly’ is closed to new replies.