From 6e8adebeb5fa2b4a99c975d6a986ef2f0ff5ffd2 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Mon, 15 Jan 2018 23:31:22 +1100 Subject: [PATCH] remove unnecessary
 tag

---
 booking.emails_admin.inc | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

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;