diff --git a/mod/journal/edit.php b/mod/journal/edit.php
index cf4796cb59c..410a5a59b40 100644
--- a/mod/journal/edit.php
+++ b/mod/journal/edit.php
@@ -75,9 +75,9 @@
$entry->format = $defaultformat;
}
- print_header_simple("$journal->name", "",
+ print_header_simple(format_string($journal->name), "",
"id\">$strjournals ->
- id\">$journal->name -> $stredit", "",
+ id\">".format_string($journal->name,true)." -> $stredit", "",
"", true, "", navmenu($course, $cm));
echo "
\n";
diff --git a/mod/journal/lib.php b/mod/journal/lib.php
index 6a191d934c1..3667d0aa9c9 100644
--- a/mod/journal/lib.php
+++ b/mod/journal/lib.php
@@ -55,7 +55,7 @@ function journal_user_complete_index($course, $user, $journal, $journalopen, $he
$entryinfo = "";
}
- $journal->name = "coursemodule\">$journal->name";
+ $journal->name = "coursemodule\">".format_string($journal->name,true)."";
if ($heading) {
echo "$heading - $journal->name$entryinfo
";
@@ -183,7 +183,7 @@ function journal_cron () {
function journal_print_recent_activity($course, $isteacher, $timestart) {
global $CFG;
- if (empty($CFG->journal_showrecentactivity)) { // Don't even bother
+ if (!empty($CFG->journal_showrecentactivity)) { // Don't even bother
return false;
}
diff --git a/mod/journal/report.php b/mod/journal/report.php
index 57799371ca6..e3bfaf182fa 100644
--- a/mod/journal/report.php
+++ b/mod/journal/report.php
@@ -40,7 +40,7 @@
print_header_simple("$strjournals", "",
"id\">$strjournals ->
- id\">$journal->name -> $strentries", "", "", true);
+ id\">".format_string($journal->name,true)." -> $strentries", "", "", true);
/// Check to see if groups are being used in this journal
diff --git a/mod/journal/restorelib.php b/mod/journal/restorelib.php
index fba290aecd8..643bed9618b 100644
--- a/mod/journal/restorelib.php
+++ b/mod/journal/restorelib.php
@@ -59,7 +59,7 @@
$newid = insert_record ("journal",$journal);
//Do some output
- echo "".get_string("modulename","journal")." \"".$journal->name."\"";
+ echo "".get_string("modulename","journal")." \"".format_string(stripslashes($journal->name),true)."\"";
backup_flush(300);
if ($newid) {
diff --git a/mod/journal/view.php b/mod/journal/view.php
index 4deaa147780..08071777bfd 100644
--- a/mod/journal/view.php
+++ b/mod/journal/view.php
@@ -28,8 +28,8 @@
$strjournal = get_string("modulename", "journal");
$strjournals = get_string("modulenameplural", "journal");
- print_header_simple("$journal->name", '',
- "id\">$strjournals -> $journal->name", '', '', true,
+ print_header_simple(format_string($journal->name), '',
+ "id\">$strjournals -> ".format_string($journal->name), '', '', true,
update_module_button($cm->id, $course->id, $strjournal), navmenu($course, $cm));
if (isteacher($course->id)) {