diff --git a/apply.php b/apply.php
index 0781f38..7a0a315 100644
--- a/apply.php
+++ b/apply.php
@@ -61,7 +61,7 @@ echo '';
foreach ( $enrols as $enrol ) {
$picture = get_user_picture($enrol->userid);
echo '
| ';
- echo '' . $enrol->course . ' | ';
+ echo '' . format_string($enrol->course) . ' | ';
echo '' . $OUTPUT->render($picture) . ' | ';
echo ''.$enrol->firstname . ' ' . $enrol->lastname.' | ';
echo '' . $enrol->email . ' | ';
diff --git a/lib.php b/lib.php
index d503b1d..26dd06e 100644
--- a/lib.php
+++ b/lib.php
@@ -203,7 +203,7 @@ function sendCancelMail($info){
global $CFG;
$apply_setting = $DB->get_records_sql("select name,value from ".$CFG->prefix."config_plugins where plugin='enrol_apply'");
- $replace = array('firstname'=>$info->firstname,'content'=>$info->coursename);
+ $replace = array('firstname'=>$info->firstname,'content'=>format_string($info->coursename));
$body = $apply_setting['cancelmailcontent']->value;
$body = updateMailContent($body,$replace);
$contact = get_admin();
@@ -215,7 +215,7 @@ function sendConfirmMail($info){
global $CFG;
$apply_setting = $DB->get_records_sql("select name,value from ".$CFG->prefix."config_plugins where plugin='enrol_apply'");
- $replace = array('firstname'=>$info->firstname,'content'=>$info->coursename);
+ $replace = array('firstname'=>$info->firstname,'content'=>format_string($info->coursename));
$body = $apply_setting['confirmmailcontent']->value;
$body = updateMailContent($body,$replace);
$contact = get_admin();
diff --git a/manage.php b/manage.php
index e27ae78..467fca5 100644
--- a/manage.php
+++ b/manage.php
@@ -50,7 +50,7 @@ echo '
';
foreach ( $enrols as $enrol ) {
echo ' | ';
- echo '' . $enrol->course . ' | ';
+ echo '' . format_string($enrol->course) . ' | ';
echo '' . $enrol->firstname . ' ' . $enrol->lastname . ' | ';
echo '' . $enrol->email . ' | ';
echo '' . date ( "Y-m-d", $enrol->timecreated ) . ' |
';