From f43e7c6f0e26549cd270c573de57d9b90cddcd1f Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 14 Jun 2003 12:09:35 +0000 Subject: [PATCH] Firming it up --- course/format/topics.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/course/format/topics.php b/course/format/topics.php index a72b83bb18..0ac240dd6f 100644 --- a/course/format/topics.php +++ b/course/format/topics.php @@ -136,16 +136,17 @@ while ($section <= $course->numsections) { if (!empty($displaysection) and $displaysection != $section) { - if (!empty($sections[$section])) { - if (strlen($sections[$section]->summary) < 57) { - $strsummary = " - ".$sections[$section]->summary; + if (empty($sections[$section])) { + $strsummary = ""; + } else { + $strsummary = " - ".strip_tags($sections[$section]->summary); + if (strlen($strsummary) < 57) { + $strsummary = " - $strsummary"; } else { - $strsummary = " - ".substr($sections[$section]->summary, 0, 60)."..."; + $strsummary = " - ".substr($strsummary, 0, 60)."..."; } - } else { - $strsummary = ""; } - $sectionmenu["topic=$section"] = "$section$strsummary"; + $sectionmenu["topic=$section"] = s("$section$strsummary"); $section++; continue; } -- 2.39.5