diff --git a/booking.emails_admin.inc b/booking.emails_admin.inc index bdcb6f2..c978783 100644 --- a/booking.emails_admin.inc +++ b/booking.emails_admin.inc @@ -651,10 +651,18 @@ function _booking_email_get_preview_callback($form, $form_state) { break; case "balance": $text = variable_get('booking_email_paymentoutstanding_text'); + // perform the checking of HTML value now since we're pre-pending text to it + $text = isset($text['format']) ? $text['value'] : $text; if (variable_get('booking_enable_combined_pricing', 0) == 1) { - $text .= "\n

If married

\n
";
+        // no 
 tags necessary if its a HTML mail
+        if(variable_get('booking_enable_html_mail', 0) == 1) {
+          $text .= "\n

If married

\n"; + } + else { + $text .= "\n

If married

\n
";
+        }
         $married_text = variable_get('booking_email_paymentoutstanding_married_text');
-        // perform the checking of HTML value now since we're pre-pending text to it
+        // repeat HTML check for rest of preview
         $text .= isset($married_text['format']) ? $married_text['value'] : $married_text;
       }         
       break;