X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fcalendar%2Fcalendar.php;h=43e32acbd9da21cc61a6a7d29c46227616cae90b;hp=5616308c0c7402dfa1f0b25d91a0b38cfdcb5fb4;hb=77a1e3d10b0fe8a81bd645e3797d425839592954;hpb=ae5dddc065f9501f267c4edaf68a066835da915f
diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index 5616308c..43e32acb 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -3,7 +3,7 @@
/**
* Displays the main calendar page (month view).
*
- * @copyright 2002-2011 The SquirrelMail Project Team
+ * @copyright 2002-2022 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
@@ -110,15 +110,15 @@ function drawmonthview() {
}
if (isset($calendardata[$cdate])){
$i=0;
- while ($calfoo = each($calendardata[$cdate])) {
- $calbar = $calendardata[$cdate][$calfoo['key']];
+ foreach ($calendardata[$cdate] as $key => $value) {
+ $calbar = $calendardata[$cdate][$key];
// FIXME: how to display multiline task
- $title = '['. $calfoo['key']. '] ' .
- str_replace(array("\r","\n"),array(' ',' '),htmlspecialchars($calbar['message']));
+ $title = '['. $key. '] ' .
+ str_replace(array("\r","\n"),array(' ',' '),sm_encode_html_special_chars($calbar['message']));
// FIXME: link to nowhere
echo "".htmlspecialchars($calbar['title'])."
\n";
+ ."\" title=\"$title\">".sm_encode_html_special_chars($calbar['title'])."
\n";
$i=$i+1;
if($i==2){
break;