* 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 74c501c0a3
commit 6613a21c7d
2 changed files with 9 additions and 2 deletions

View File

@ -1117,7 +1117,7 @@ class calendar_uiforms extends calendar_ui
if(!is_array($event['link_to'])) $event['link_to'] = array();
$event['link_to']['to_app'] = 'calendar';
$event['link_to']['to_id'] = 0;
foreach(Link::get_links($event['link_to']['to_app'], $event['id']) as $link)
{
if(!$link['id']) continue;
@ -1936,6 +1936,13 @@ class calendar_uiforms extends calendar_ui
}
$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
$this->bo->server2usertime($event);

View File

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