diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 954d630eb..4440f2242 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1729,7 +1729,7 @@ class BBCode // start which is always required). Allow desc with a missing summary for compatibility. if ((!empty($ev['desc']) || !empty($ev['summary'])) && !empty($ev['start'])) { - $sub = Event::getHTML($ev, $simple_html); + $sub = Event::getHTML($ev, $simple_html, $uriid); $text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/ism", '', $text); $text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism", '', $text); diff --git a/src/Model/Event.php b/src/Model/Event.php index 6caa4b871..0cc2aeaa4 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -41,12 +41,14 @@ use Friendica\Util\XML; class Event { - public static function getHTML(array $event, $simple = false) + public static function getHTML(array $event, $simple = false, $uriid = 0) { if (empty($event)) { return ''; } + $uriid = $event['uri-id'] ?? $uriid; + $bd_format = DI::l10n()->t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8 AM. $event_start = DI::l10n()->getDay( @@ -67,11 +69,11 @@ class Event $o = ''; if (!empty($event['summary'])) { - $o .= "
" . $event_start . "
"; @@ -81,7 +83,7 @@ class Event } if (!empty($event['location'])) { - $o .= "" . BBCode::convertForItem($event['uri-id'], Strings::escapeHtml($event['location']), $simple) . "
"; + $o .= "" . BBCode::convertForItem($uriid, Strings::escapeHtml($event['location']), $simple) . "
"; } return $o; @@ -89,7 +91,7 @@ class Event $o = '