• Resolved helmcor

    (@helmcor)


    Under “Points notification” menu I try to use a personal html template but when I click on Save Changes and the page realoads all the html tags are removed from the text box and just the raw text remains. I tried to send a test email to myself and as I presumed the email had only the text in the body and nothing else.
    Does anybody know what could be the problem?

    • This topic was modified 5 years, 7 months ago by helmcor.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @helmcor ,
    We have developed our plugin according to WordPress standards. We have used wp_unslash when any data entered by the customer. wp_unslash will remove HTML the tags from the wp-editor.
    If you want to add the HTML tags in the wp-editor you need to make these change in the code-

    File path points-and-rewards-for-woocommerce/admin/partials/templates/mwb-points-notification-settings.php
    You need to comment the code on these lines 31, 32, 33

    //$value = $settings_obj->mwb_rwpr_filter_subj_email_notification_settings( $mwb_wpr_post_data, $key );
    //$value = stripcslashes( $value );
    //$value = sanitize_text_field( $value );

    After making this change HTML tags will not get removed from wp-editor.
    Thanks

    Thread Starter helmcor

    (@helmcor)

    Hello!

    After I commented out the previously mentioned code. I can save html templates as well and in the HTML tab the template is still there properly, but when the client receives the email as normal text.
    The link does not work, the attached image is not displayed. Only the text is there.

    Hello @helmcor ,

    If the template is save correctly in HTML format , then it should be displayed in HTML format in mail also.

    Please change the following function code once just replace this function.
    FILE PATH->points-and-rewards-for-woocommerce/public/class-points-rewards-for-woocommerce-public.php
    line no 673.

    public static function mwb_wpr_get_email_notification_description( $id ) {
    		
    		$mwb_wpr_notificatin_array = get_option( 'mwb_wpr_notificatin_array', true );
    		$mwb_wpr_email_discription = isset( $mwb_wpr_notificatin_array[ $id ] ) ? stripcslashes( $mwb_wpr_notificatin_array[ $id ] ) : '';
    		return $mwb_wpr_email_discription;
    	}

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘HTML tags are removed’ is closed to new replies.