diff --git a/booking.helper.inc b/booking.helper.inc index de52ae6..09021db 100644 --- a/booking.helper.inc +++ b/booking.helper.inc @@ -1637,9 +1637,12 @@ function _booking_studygroup_email_summary($node) { 'studygroup-role' => _booking_studygroup_role_lookup($node->$roleid), ); - $li_text = variable_get('booking_studygroup_summary_li_text', - 'You are a [meta-booking:studygroup-role] for group [meta-booking:studygroup-descrip], which will occur on [meta-booking:studygroup-weekday].
[meta-booking:studygroup-explan]'); - $rows[] = token_replace($li_text, $tokens); + $list_element_text = variable_get('booking_studygroup_summary_li_text', + 'You are a [meta-booking:studygroup-role] for group [meta-booking:studygroup-descrip], which will occur on [meta-booking:studygroup-weekday]. ' . + '
[meta-booking:studygroup-explan]'); + // Make sure there is only HTML in the admin-entered text + $list_element_text = check_markup($list_element_text, 'full_html', '', FALSE); + $rows[] = token_replace($list_element_text, $tokens); /* // Add some boldness if we're using html email if(variable_get('booking_enable_html_mail', 0) == 1) { @@ -1684,6 +1687,7 @@ function _booking_studygroup_email_summary($node) { function _booking_leader_helper_email_summary($node) { global $event; $rows = array(); + $tokens = array(); $found = FALSE; //display study session data if enabled @@ -1693,8 +1697,6 @@ function _booking_leader_helper_email_summary($node) { array(':eid' => $event->eid)); $studygroups = $studygroups_query->fetchAllAssoc('sid'); - $rows[] = ""; - //format the output to be used in an email foreach ($rows as $key => $value) { $rows[$key] = wordwrap($value); } if(variable_get('booking_enable_html_mail', 0) == 1) { - return implode("\n
", $rows); + // Turn the rows into an unordered list + $output = "\n\n"; + return $output; } else { + // Plain text so just separate by newline return implode("\n", $rows); } }