* Mail: Fix links get removed from description content of calendar appointment email

This commit is contained in:
Hadi Nategh 2017-06-14 10:27:51 +02:00
parent f8adc0cadf
commit 8340520589
2 changed files with 9 additions and 2 deletions

View File

@ -1116,7 +1116,7 @@ class calendar_uiforms extends calendar_ui
if(!is_array($event['link_to'])) $event['link_to'] = array(); if(!is_array($event['link_to'])) $event['link_to'] = array();
$event['link_to']['to_app'] = 'calendar'; $event['link_to']['to_app'] = 'calendar';
$event['link_to']['to_id'] = 0; $event['link_to']['to_id'] = 0;
foreach(Link::get_links($event['link_to']['to_app'], $event['id']) as $link) foreach(Link::get_links($event['link_to']['to_app'], $event['id']) as $link)
{ {
if(!$link['id']) continue; if(!$link['id']) continue;
@ -1936,6 +1936,13 @@ class calendar_uiforms extends calendar_ui
} }
$event = array_shift($events); $event = array_shift($events);
/* Encode html specialchars (eg. < to &lt;) because client-side core
* widget runs decoding for the value causes elimination of none
* encoded html chars. This will help included links inside description
* get displayed if activate_links = ture for description widget is set.
*/
if ($event['description'] != '') $event['description'] = htmlspecialchars($event['description']);
// convert event from servertime returned by calendar_ical to user-time // convert event from servertime returned by calendar_ical to user-time
$this->bo->server2usertime($event); $this->bo->server2usertime($event);

View File

@ -71,7 +71,7 @@
</row> </row>
<row class="row" valign="top"> <row class="row" valign="top">
<description value="Description"/> <description value="Description"/>
<description id="description" no_lang="1"/> <description id="description" no_lang="ture" activate_links="true"/>
</row> </row>
<row class="row" valign="top"> <row class="row" valign="top">
<description value="Participants"/> <description value="Participants"/>