diff options
author | Mario <mario@mariovavti.com> | 2024-03-15 22:34:27 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-03-15 22:34:27 +0000 |
commit | f3efdbf230657ce0c7ada803b97161b8fe4d5ae8 (patch) | |
tree | 9a86346519e498562bc4b8a33c1d392c12c0be36 /include/bbcode.php | |
parent | 826ef11247b08d4803602fc735b1b0e9fd0191dc (diff) | |
download | volse-hubzilla-f3efdbf230657ce0c7ada803b97161b8fe4d5ae8.tar.gz volse-hubzilla-f3efdbf230657ce0c7ada803b97161b8fe4d5ae8.tar.bz2 volse-hubzilla-f3efdbf230657ce0c7ada803b97161b8fe4d5ae8.zip |
adjust encrypted content representation and also add it to bb_to_markdown
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 14 |
1 files changed, 7 insertions, 7 deletions
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 .= '<code>'; - $r .= '----- ENCRYPTED CONTENT -----' . '<br>'; - $r .= $match[2] . '<br>'; - $r .= '----- END ENCRYPTED CONTENT -----'; - $r .= '</code>'; + $r = '<code>' . str_replace("\n", '<br>', wordwrap($r, 75, "\n", true)) . '</code>'; return $r; } - function bb_parse_app($match) { $app = Zotlabs\Lib\Apps::app_decode($match[1]); |