Fix spoiler displaying while convert BBcode to markdown

This commit is contained in:
Max Kostikov 2019-08-22 20:17:22 +02:00
parent e5539c0d01
commit cf9ef615c9

View File

@ -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);