From f3efdbf230657ce0c7ada803b97161b8fe4d5ae8 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 15 Mar 2024 22:34:27 +0000 Subject: adjust encrypted content representation and also add it to bb_to_markdown --- include/bbcode.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index 20a866073..db4147c1e 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -297,20 +297,20 @@ function bb_parse_crypt($match) { */ function bb_parse_b64_crypt($match) { - if(empty($match[2])) + if(empty($match[1])) { return; + } + + $r = '-----BEGIN ENCRYPTED MESSAGE-----' . "\n"; + $r .= $match[1] . "\n"; + $r .= '-----END ENCRYPTED MESSAGE-----' . "\n"; - $r .= ''; - $r .= '----- ENCRYPTED CONTENT -----' . '
'; - $r .= $match[2] . '
'; - $r .= '----- END ENCRYPTED CONTENT -----'; - $r .= '
'; + $r = '' . str_replace("\n", '
', wordwrap($r, 75, "\n", true)) . '
'; return $r; } - function bb_parse_app($match) { $app = Zotlabs\Lib\Apps::app_decode($match[1]); -- cgit v1.2.3