• I am using the Simple User Registration plugin.

    When I create my Email on the Templates tab formatting is not applied.
    1. Select Email Templates tab on WP Registration in WordPress
    2. Go to the new user email text box
    3. Enter text with paragraphs

    I expect paragraphs to be retained as per the setup video.

    What happens is that after saving the settings all the paragraphs are removed and the text becomes one unbroken line of words with the spacing between each word.

    How can I create paragraphs?

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author N-Media

    (@nmedia)

    Hi,

    We have noted this issue and check, and fix if such thing exists in our plugin.

    BR,
    Najeeb

    Thread Starter ceebucks

    (@ceebucks)

    Thank you. I’ll check to see if it’s fixed. If not will you issue a new version? While you’re here does this problem exist in your upgrade version?

    I can confirm this is an issue for me as well. The sanitize_text_field on the email setting field needs to be changed to sanitize_text_area in order to preserve line breaks:

    $sanitized_settings['nm_wpregistration_new_user']		= sanitize_text_field($_REQUEST['nm_wpregistration_new_user']);
    

    The same goes for all textarea fields in the settings section: nm_wpregistration_form_css, nm_wpregistration_form_desc nm_wpregistration_terms_condition etc. This is a fairly new function, (4.7.0) so some backward compatibility checks should be added as well.

    helenbutt

    (@helenbutt)

    Hi,

    I’m having the same problem with trying to format the content of the new user email. The line breaks I insert are not being recognised.

    Where can I find the sanitize_text_field and others mentioned above?

    Thanks,
    Helen

    helenbutt

    (@helenbutt)

    Hi,

    I found sanitize_text_field in plugin.class.php

    I changed all instances of sanitize_text_field to sanitize_text_area

    When I now try to apply line breaks via the Emails Templates tab of WP Registration by clicking on “Save Settings” I just get a whirring cog.

    Have I changed the right code? Do I need to look elsewhere for other instances?

    I would appreciate an answer from the plugin author for an update on when this issue might be fixed / when an update of the plugin will be released.

    Many thanks,
    Helen

    20×6

    (@20x6)

    Helen-

    Unfortunately I have not had time to test my suggested fix yet, so it may not get to the root of the issue. I should point out that not every field needs to be changed, only multiline fields like ‘nm_wpregistration_new_user’ . My suggestion is to try reverting all your code changes, and then only change the sanitize_text_field function to sanitize_text_area and see if that fixes your issue.

    helenbutt

    (@helenbutt)

    Hi 20×6 – thanks for getting back to me ?? I tried this and it didn’t work. Hopefully there will be a fix for this soon.

    Laurence Tuck

    (@laurenceshowmecoza)

    @najeeb – the fix for this is one edit in your plugin class. Editing your plugin will then break future updates which is bad practice. Line 271, PLEASE push an update!! Is this fixed in your PRO version?

    In the meantime the fix is on line 271 in /classes/plugin.class.php:

    $sanitized_settings[‘nm_wpregistration_new_user’] = sanitize_text_field($_REQUEST[‘nm_wpregistration_new_user’]);

    to

    $sanitized_settings[‘nm_wpregistration_new_user’] = sanitize_textarea_field($_REQUEST[‘nm_wpregistration_new_user’]);

    @laurenceshowmecoza

    Tremendous help.Thank you Laurence. Hope it gets included in a future update.

    Diane

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘The Simple User Registration Plugin Email Templates paragraphs are removed’ is closed to new replies.