From 1146fca2cd43f79b42ee8434932b8df35cfd1ae4 Mon Sep 17 00:00:00 2001
From: Michael
Date: Fri, 17 Mar 2023 06:10:56 +0000
Subject: [PATCH] HTML: Use paragraphs instead of double line breaks
---
src/Content/Text/BBCode.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php
index 33f91b43d1..c9bbc02c93 100644
--- a/src/Content/Text/BBCode.php
+++ b/src/Content/Text/BBCode.php
@@ -1460,6 +1460,7 @@ class BBCode
// @deprecated since 2021.12, left for backward-compatibility reasons
$text = preg_replace("(\[class=(.*?)\](.*?)\[\/class\])ism", '$2', $text);
// Add HTML new lines
+ $text = str_replace("\n\n", '
', $text);
$text = str_replace("\n", '
', $text);
// handle nested lists
@@ -1938,7 +1939,7 @@ class BBCode
: []
);
- $text = HTML::purify($text, $allowedIframeDomains);
+ $text = HTML::purify('
' . $text . '
', $allowedIframeDomains);
DI::profiler()->stopRecording();
return trim($text);
--
2.39.5