mirror of
https://github.com/friendica/friendica
synced 2025-04-26 10:30:11 +00:00
Normalize expected format for event fields summary, desc and location
- Remove unnecessary HTML escaping on event submit - Add HTML escaping on event display - Add HTML to BBCode conversion for received ActivityPub events
This commit is contained in:
parent
c9c9fc3a96
commit
a8b0aa8c8d
3 changed files with 27 additions and 26 deletions
|
@ -209,20 +209,20 @@ class Processor
|
|||
*/
|
||||
public static function createEvent($activity, $item)
|
||||
{
|
||||
$event['summary'] = $activity['name'];
|
||||
$event['desc'] = $activity['content'];
|
||||
$event['start'] = $activity['start-time'];
|
||||
$event['finish'] = $activity['end-time'];
|
||||
$event['summary'] = HTML::toBBCode($activity['name']);
|
||||
$event['desc'] = HTML::toBBCode($activity['content']);
|
||||
$event['start'] = $activity['start-time'];
|
||||
$event['finish'] = $activity['end-time'];
|
||||
$event['nofinish'] = empty($event['finish']);
|
||||
$event['location'] = $activity['location'];
|
||||
$event['adjust'] = true;
|
||||
$event['cid'] = $item['contact-id'];
|
||||
$event['uid'] = $item['uid'];
|
||||
$event['uri'] = $item['uri'];
|
||||
$event['edited'] = $item['edited'];
|
||||
$event['private'] = $item['private'];
|
||||
$event['guid'] = $item['guid'];
|
||||
$event['plink'] = $item['plink'];
|
||||
$event['adjust'] = true;
|
||||
$event['cid'] = $item['contact-id'];
|
||||
$event['uid'] = $item['uid'];
|
||||
$event['uri'] = $item['uri'];
|
||||
$event['edited'] = $item['edited'];
|
||||
$event['private'] = $item['private'];
|
||||
$event['guid'] = $item['guid'];
|
||||
$event['plink'] = $item['plink'];
|
||||
|
||||
$condition = ['uri' => $item['uri'], 'uid' => $item['uid']];
|
||||
$ev = DBA::selectFirst('event', ['id'], $condition);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue