Support » Plugin: WP FAQ Schema Markup for SEO » Line breaks are converted to “rn”

  • Resolved jhtjards

    (@jhtjards)


    Hi, first a “thank you”, very nice from you to supply us with your plugin.

    However, I’m having trouble using line breaks and list markup with your plugin.

    Upon saving a post line breaks are converted to “rn” and with list items I also get a “t” inserted into the markup. You can easily replicate this just by adding a line break and saving.
    This is what I get for example (in the editor as well as in the frontend):
    <ul>rn t<li>List item</li>rn t<li>List item</li></ul>
    while it should be

    <ul>
    	<li>List item</li>
    	<li>List item</li>
    </ul>

    While I can manually remove all breaks and within standard text replace them with <br> and <p> etc. this is not really desirable for anyone.

    FYI: I’m using the classic editor.

    Hope you can look into that.

    Cheers
    j

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thanks for tackling the issue so quickly with your new update.

    I’ve added the wp function wpautop() (Codex) in line 64 in the admin/init.php so it converts text into paragraphs (using false for the linebreak setting).
    It works really nice for me, maybe something worth considering for the general public too.

    $answer = wpautop( $answer, false ); // Added by JHTjards, false = no br Conversion
    $answer = preg_replace('/\s+/S', " ", $answer); // Original Setting, removes returns etc
    Plugin Author HobCore

    (@hobcore)

    Thanks for your suggestion and for the record we have fixed it in our latest update.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.