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[] = "
Other person for studygroup !group and role !role result:\n@info", // array('!group' => $studygroup->sid, '!role' => $otherrole_id, '@info' => print_r( $otherperson, true))); @@ -1741,25 +1743,51 @@ function _booking_leader_helper_email_summary($node) { $otherperson_email = $other->booking_email; $otherperson_phone = $other->booking_mobile; } + + // Generate tokens + $tokens = array( + 'studygroup-descrip' => $studygroup->booking_studygroup_descrip, + 'studygroup-weekday' => $studygroup->booking_studygroup_weekday, + 'studygroup-explan' => $studygroup->booking_studygroup_explanation, + 'studygroup-role' => $role, + 'studygroup-otherrole' => $otherrole, + 'studygroup-othername' => $otherperson_name, + 'studygroup-otheremail' => $otherperson_email, + 'studygroup-otherphone' => $otherperson_phone, + ); + + $list_element_text = variable_get('booking_studygroup_leaderhelperpair_text', + '[meta-booking:studygroup-role] for [meta-booking:studygroup-descrip]. ' . + 'Your [meta-booking:studygroup-otherrole] is [meta-booking:studygroup-othername]. ' . + 'You can contact them on [meta-booking:studygroup-otherphone] or [meta-booking:studygroup-otheremail].' + ); + // 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); - $rows[] = t('