From 052ad155a22d277edc27df9ae5a21a2d582bcaa7 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 11 Mar 2018 21:10:36 +0000 Subject: [PATCH] Issue 4115: Events are now formatted better for Diaspora --- include/event.php | 4 ++-- src/Content/Text/BBCode.php | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/event.php b/include/event.php index 1c34e03cc6..c49c9220f2 100644 --- a/include/event.php +++ b/include/event.php @@ -40,7 +40,7 @@ function format_event_html($ev, $simple = false) { if ($simple) { $o = "

" . BBCode::convert($ev['summary']) . "

"; - $o .= "
" . BBCode::convert($ev['desc']) . "
"; + $o .= "

" . BBCode::convert($ev['desc']) . "

"; $o .= "

" . L10n::t('Starts:') . "

" . $event_start . "

"; @@ -49,7 +49,7 @@ function format_event_html($ev, $simple = false) { } if (strlen($ev['location'])) { - $o .= "

" . L10n::t('Location:') . "

" . $ev['location'] . "

"; + $o .= "

" . L10n::t('Location:') . "

" . BBCode::convert($ev['location']) . "

"; } return $o; diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 744ddd46ba..9eb5cfd724 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1604,9 +1604,7 @@ class BBCode $text = preg_replace_callback( "/\[map\](.*?)\[\/map\]/ism", function ($match) { - // the extra space in the following line is intentional - // Whyyy? - @MrPetovan - return str_replace($match[0], '
' . Map::byLocation($match[1]) . '
', $match[0]); + return str_replace($match[0], '

' . Map::byLocation($match[1]) . '

', $match[0]); }, $text ); @@ -1615,9 +1613,7 @@ class BBCode $text = preg_replace_callback( "/\[map=(.*?)\]/ism", function ($match) { - // the extra space in the following line is intentional - // Whyyy? - @MrPetovan - return str_replace($match[0], '
' . Map::byCoordinates(str_replace('/', ' ', $match[1])) . '
', $match[0]); + return str_replace($match[0], '

' . Map::byCoordinates(str_replace('/', ' ', $match[1])) . '

', $match[0]); }, $text );