possible fix for issue #1843

This commit is contained in:
Mario
2024-03-20 21:08:23 +00:00
parent edf898d7b7
commit 66f5b34c07

View File

@@ -1729,10 +1729,12 @@ function bbcode($text, $options = []) {
}
// oembed tag
$text = oembed_bbcode2html($text);
if (strpos($text,'[/embed]') !== false) {
$text = oembed_bbcode2html($text);
// Avoid triple linefeeds through oembed
$text = str_replace("<br style='clear:left'></span><br /><br />", "<br style='clear:left'></span><br />", $text);
// Avoid triple linefeeds through oembed
$text = str_replace("<br style='clear:left'></span><br /><br />", "<br style='clear:left'></span>", $text);
}
// If we found an event earlier, strip out all the event code and replace with a reformatted version.
// Replace the event-start section with the entire formatted event. The other bbcode is stripped.