• Resolved darwinstubby

    (@darwinstubby)


    Hi Pricelisto,
    Great software, thanks!
    Whenever I save a menu item description it strips the new line characters.
    Is it possible to stop this happening?

    Thanks…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author PriceListo

    (@pricelisto)

    Hey @darwinstubby,

    There is no quick way to fix that right now as it requires changes in multiple files but we have fixed it for next minor version which should be released fairly soon.

    Thread Starter darwinstubby

    (@darwinstubby)

    Hi Pricelisto,
    Thanks for the reply.
    For a very rough workaround, I replaced

    $item_desc = isset( $_POST[‘item_desc’] ) ? sanitize_text_field($_POST[‘item_desc’] ) : 0;

    with

    $item_desc = isset( $_POST[‘item_desc’] ) ? wp_strip_all_tags( $_POST[‘item_desc’] ) : 0;

    on line 111 of ./includes/admin/class-brm-admin-items.php

    and then replaced line 63 of ./templates/func-temp/minimalist.php with
    <div class=”brm-item-description”><?php echo nl2br($item->description); ?></div>

    We need new lines in the “item description” because the menu is bilingual. Looks a bit odd having a different language start on the same line.

    Looking forward to the next release…

    Plugin Author PriceListo

    (@pricelisto)

    This should be fixed in latest 1.2.0 version. Closing this post.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘New line characters being stripped from “Item Description” on Save’ is closed to new replies.