]> git.mxchange.org Git - friendica.git/commitdiff
Issue 4115: Events are now formatted better for Diaspora
authorMichael <heluecht@pirati.ca>
Sun, 11 Mar 2018 21:10:36 +0000 (21:10 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 11 Mar 2018 21:10:36 +0000 (21:10 +0000)
include/event.php
src/Content/Text/BBCode.php

index 1c34e03cc686e7f0e2e8e15d9a58adf57aa8413a..c49c9220f2b1bd85b1af3b2140825bb57fdf2e9e 100644 (file)
@@ -40,7 +40,7 @@ function format_event_html($ev, $simple = false) {
        if ($simple) {
                $o = "<h3>" . BBCode::convert($ev['summary']) . "</h3>";
 
-               $o .= "<div>" . BBCode::convert($ev['desc']) . "</div>";
+               $o .= "<p>" . BBCode::convert($ev['desc']) . "</p>";
 
                $o .= "<h4>" . L10n::t('Starts:') . "</h4><p>" . $event_start . "</p>";
 
@@ -49,7 +49,7 @@ function format_event_html($ev, $simple = false) {
                }
 
                if (strlen($ev['location'])) {
-                       $o .= "<h4>" . L10n::t('Location:') . "</h4><p>" . $ev['location'] . "</p>";
+                       $o .= "<h4>" . L10n::t('Location:') . "</h4><p>" . BBCode::convert($ev['location']) . "</p>";
                }
 
                return $o;
index 744ddd46ba461abad138d93fceb8675381b83bac..9eb5cfd72453b6a46ab89c7ba6d77578d6e0adec 100644 (file)
@@ -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], '<div class="map"  >' . Map::byLocation($match[1]) . '</div>', $match[0]);
+                                       return str_replace($match[0], '<p class="map">' . Map::byLocation($match[1]) . '</p>', $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], '<div class="map"  >' . Map::byCoordinates(str_replace('/', ' ', $match[1])) . '</div>', $match[0]);
+                                       return str_replace($match[0], '<p class="map">' . Map::byCoordinates(str_replace('/', ' ', $match[1])) . '</p>', $match[0]);
                                },
                                $text
                        );