Support » Plugin: Markdown on Save Improved » MOSI adding extra p tags

  • Resolved Andy Fragen



    I just updated to latest version of MOSI, 2.4.1. I just noticed that I seem to have extra p tags surrounding text that should have extra p tags.

    I have the following line.

    Table of 10 Guests - $2150.00* [wp_cart:Table of 10 Guests:price:2150.00:end]

    In the dingus it converts to the following.

    <p>Table of 10 Guests - $2150.00* [wp_cart:Table of 10 Guests:price:2150.00:end]</p>

    In my blog, using MOSI 2.4.1 it converts to the following.

    <p>Table of 10 Guests – $2150.00* </p>
    <div class="wp_cart_button_wrapper">
    <form class="wp-cart-button-form" onsubmit="return ReadForm(this, true);" style="display:inline" action="" method="post">

    Obviously the shortcode expands, but you can see 2 pair of p tags that aren’t where they should be. I believe this worked properly in a previous version but I don’t remember which version I was using prior to the update.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Matt Wiebe


    Are you seeing that markup in View Source or in your dev tools? I’m guessing the latter, because it’s illegal to have a div inside a p element. Your browser will parse it into the legal HTML that you pasted.

    Actually I’m seeing this in the View Source. I guess the point is that there shouldn’t be p tags as the source only has a single space between the text and the shortcode.

    I don’t remember what the source looked like previously with the shortcode expanded, but it didn’t have p tags around the text and the button from the shortcode followed the text on the same line.

    I also noticed that previewing page or post changes doesn’t expand the Markdown markup where previously I could’ve sworn it did. I don’t know if this is related or not. If you want me to start a separate thread let me know.

    Plugin Author Matt Wiebe


    Andy, I just tested this, and it definitely is an issue with legal HTML parsing. Wherever you’re viewing source is showing you parsed HTML, not raw HTML.

    As for the other issue, that’s its own issue, and should be separate. But previewing works fine for me. Please try disabling your other plugins first and then see if previewing works.

    Matt, I’m sorry. You are correct. I was viewing parsed html and not raw html. That’s what I get for doing some minor revisions on my iPad.

    If I run into the preview issue again I’ll post another thread.


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘MOSI adding extra p tags’ is closed to new replies.