diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/import.php | 4 | ||||
-rw-r--r-- | include/markdown.php | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/include/import.php b/include/import.php index 1d3b7c035..d3e8f7091 100644 --- a/include/import.php +++ b/include/import.php @@ -1190,9 +1190,9 @@ function sync_files($channel, $files) { logger('sync_files duplicate check: attach_by_hash() returned ' . print_r($x,true), LOGGER_DEBUG); if($x['success']) { - $orig_attach = $x[0]; + $orig_attach = $x['data']; $attach_exists = true; - $attach_id = $x[0]['id']; + $attach_id = $orig_attach['id']; } $newfname = 'store/' . $channel['channel_address'] . '/' . get_attach_binname($att['content']); 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); |