aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-08-22 20:20:44 +0200
committerMax Kostikov <max@kostikov.co>2019-08-22 20:20:44 +0200
commitcab24836d86e58549cb776b054d280a4b7ab7cf0 (patch)
tree3e2e798108faf6ff79784a5c1847314331ec8593
parente5539c0d01c1be0b9235aee4aec38f7860cc6959 (diff)
parentcf9ef615c96d0b74ad4d676f48cb67e41a56f5d5 (diff)
downloadvolse-hubzilla-cab24836d86e58549cb776b054d280a4b7ab7cf0.tar.gz
volse-hubzilla-cab24836d86e58549cb776b054d280a4b7ab7cf0.tar.bz2
volse-hubzilla-cab24836d86e58549cb776b054d280a4b7ab7cf0.zip
Merge branch 'dev' into 'dev'
Fix spoiler displaying while convert BBcode to markdown See merge request hubzilla/core!1715
-rw-r--r--include/markdown.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/markdown.php b/include/markdown.php
index 7d1f16958..0a8076799 100644
--- a/include/markdown.php
+++ b/include/markdown.php
@@ -264,6 +264,9 @@ function bb_to_markdown($Text, $options = []) {
// Remove empty zrl links
$Text = preg_replace("/\[zrl\=\].*?\[\/zrl\]/is", "", $Text);
+
+ // Remove unprocessed spoiler HTML tags
+ $Text = strip_tags(preg_replace("/(<\/div>)(>.+)$/im", "$1\n$2", $Text));
$Text = trim($Text);