From cf9ef615c96d0b74ad4d676f48cb67e41a56f5d5 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Thu, 22 Aug 2019 20:17:22 +0200 Subject: Fix spoiler displaying while convert BBcode to markdown --- include/markdown.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') 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); -- cgit v1.2.3