aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-08-22 20:17:22 +0200
committerMax Kostikov <max@kostikov.co>2019-08-22 20:17:22 +0200
commitcf9ef615c96d0b74ad4d676f48cb67e41a56f5d5 (patch)
tree3e2e798108faf6ff79784a5c1847314331ec8593 /include
parente5539c0d01c1be0b9235aee4aec38f7860cc6959 (diff)
downloadvolse-hubzilla-cf9ef615c96d0b74ad4d676f48cb67e41a56f5d5.tar.gz
volse-hubzilla-cf9ef615c96d0b74ad4d676f48cb67e41a56f5d5.tar.bz2
volse-hubzilla-cf9ef615c96d0b74ad4d676f48cb67e41a56f5d5.zip
Fix spoiler displaying while convert BBcode to markdown
Diffstat (limited to 'include')
-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);