mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Some fixes to HTML quoting in calendar popups.
Fixes bug 1502.
This commit is contained in:
parent
558a1ede02
commit
c9b05b32fa
1 changed files with 3 additions and 2 deletions
|
@ -194,7 +194,7 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
|
||||||
$popupalt = '';
|
$popupalt = '';
|
||||||
} else if ($event->courseid > 1 and empty($event->groupid)) { // Course event
|
} else if ($event->courseid > 1 and empty($event->groupid)) { // Course event
|
||||||
$popupicon = $CFG->pixpath.'/c/course.gif';
|
$popupicon = $CFG->pixpath.'/c/course.gif';
|
||||||
$popupalt = '';
|
$popupalt = '';
|
||||||
} else if ($event->groupid) { // Group event
|
} else if ($event->groupid) { // Group event
|
||||||
$popupicon = $CFG->pixpath.'/c/group.gif';
|
$popupicon = $CFG->pixpath.'/c/group.gif';
|
||||||
$popupalt = '';
|
$popupalt = '';
|
||||||
|
@ -202,10 +202,11 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
|
||||||
$popupicon = $CFG->pixpath.'/c/user.gif';
|
$popupicon = $CFG->pixpath.'/c/user.gif';
|
||||||
$popupalt = '';
|
$popupalt = '';
|
||||||
}
|
}
|
||||||
$popupcontent .= '<div><img height=16 width=16 src=\\\''.$popupicon.'\\\' style=\\\'vertical-align: middle; margin-right: 4px;\\\' alt=\\\''.$popupalt.'\\\' /><a href=\\\''.$dayhref.'\\\'>'.addslashes(htmlspecialchars($event->name)).'</a></div>';
|
$popupcontent .= '<div><img height=16 width=16 src="'.$popupicon.'" style="vertical-align: middle; margin-right: 4px;" alt="'.$popupalt.'" /><a href="'.$dayhref.'">'.$event->name.'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$popupcaption = get_string('eventsfor', 'calendar', userdate($events[$eventid]->timestart, $strftimetimedayshort));
|
$popupcaption = get_string('eventsfor', 'calendar', userdate($events[$eventid]->timestart, $strftimetimedayshort));
|
||||||
|
$popupcontent = str_replace("'", "\'", htmlSpecialChars($popupcontent));
|
||||||
$popup = 'onmouseover="return overlib(\''.$popupcontent.'\', CAPTION, \''.$popupcaption.'\');" onmouseout="return nd();"';
|
$popup = 'onmouseover="return overlib(\''.$popupcontent.'\', CAPTION, \''.$popupcaption.'\');" onmouseout="return nd();"';
|
||||||
|
|
||||||
// Class and cell content
|
// Class and cell content
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue