diff --git a/root/adm/style/portal/acp_portal_calendar.html b/root/adm/style/portal/acp_portal_calendar.html
index e77302f8..7bf27986 100644
--- a/root/adm/style/portal/acp_portal_calendar.html
+++ b/root/adm/style/portal/acp_portal_calendar.html
@@ -184,7 +184,7 @@
| {events.EVENT_TITLE} |
{events.EVENT_DESC} |
{L_EVENT_START}: {events.EVENT_START} | {L_EVENT_END}: {events.EVENT_END}{L_EVENT_TIME}: {events.EVENT_START} | {L_EVENT_ALL_DAY} |
- {events.EVENT_URL} |
+ {events.EVENT_URL_RAW} |
{ICON_EDIT} {ICON_DELETE}
|
diff --git a/root/portal/modules/portal_calendar.php b/root/portal/modules/portal_calendar.php
index f8b0c75d..3217e715 100644
--- a/root/portal/modules/portal_calendar.php
+++ b/root/portal/modules/portal_calendar.php
@@ -174,7 +174,7 @@ class portal_calendar_module
if((($cur_event['start_time'] + 86400) >= $today_timestamp && $cur_event['all_day']) || ($cur_event['start_time'] <= $today_timestamp && $cur_event['end_time'] >= $today_timestamp))
{
$template->assign_block_vars('cur_events', array(
- 'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url(str_replace('&', '&', $cur_event['url'])) : '',
+ 'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url($cur_event['url']) : '',
'EVENT_TITLE' => $cur_event['title'],
'START_TIME' => $user->format_date($cur_event['start_time'], 'j. M Y, H:i'),
'END_TIME' => (!empty($cur_event['end_time'])) ? $user->format_date($cur_event['end_time'], 'j. M Y, H:i') : false,
@@ -185,7 +185,7 @@ class portal_calendar_module
else
{
$template->assign_block_vars('upcoming_events', array(
- 'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url(str_replace('&', '&', $cur_event['url'])) : '',
+ 'EVENT_URL' => (isset($cur_event['url']) && $cur_event['url'] != '') ? $this->validate_url($cur_event['url']) : '',
'EVENT_TITLE' => $cur_event['title'],
'START_TIME' => $user->format_date($cur_event['start_time'], 'j. M Y, H:i'),
'END_TIME' => $user->format_date($cur_event['end_time'], 'j. M Y, H:i'),
@@ -497,7 +497,8 @@ class portal_calendar_module
'EVENT_DESC' => ($action != 'add') ? $events[$i]['desc'] : '',
'EVENT_START' => ($action != 'add') ? $user->format_date($events[$i]['start_time'], $start_time_format) : '',
'EVENT_END' => ($action != 'add' && !$event_all_day) ? $user->format_date($events[$i]['end_time'], $end_time_format) : '',
- 'EVENT_URL' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? str_replace('&', '&', $events[$i]['url']) : '',
+ 'EVENT_URL' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? $this->validate_url($events[$i]['url']) : '',
+ 'EVENT_URL_RAW' => ($action != 'add' && isset($events[$i]['url']) && !empty($events[$i]['url'])) ? $events[$i]['url'] : '',
'U_EDIT' => $u_action . '&action=edit&id=' . $i,
'U_DELETE' => $u_action . '&action=delete&id=' . $i,
'EVENT_ALL_DAY' => $event_all_day,
@@ -576,8 +577,8 @@ class portal_calendar_module
$url = 'http://' . $url;
}
- // Is this a link to somewhere inside this board? If so then remove the session id from the url
- if (strpos($url, generate_board_url()) !== false && strpos($url, 'sid=') !== false)
+ // Is this a link to somewhere inside this board? If so then run reapply_sid()
+ if (strpos($url, generate_board_url()) !== false)
{
$url = reapply_sid($url);
}