diff options
author | zotlabs <mike@macgirvin.com> | 2017-07-30 13:52:16 -0700 |
---|---|---|
committer | git-marijus <mario@mariovavti.com> | 2017-07-31 02:54:58 +0200 |
commit | 17618be14d1b9213822643ed6af92ac04fe70767 (patch) | |
tree | 3379f02cd0bcbcc89542be2bb0ce7251911db3d6 | |
parent | 3faca10efc09a2fb40cacffffda80c99fd6bace5 (diff) | |
download | volse-hubzilla-17618be14d1b9213822643ed6af92ac04fe70767.tar.gz volse-hubzilla-17618be14d1b9213822643ed6af92ac04fe70767.tar.bz2 volse-hubzilla-17618be14d1b9213822643ed6af92ac04fe70767.zip |
add options flag to bb_to_markdown so we can distinguish between diaspora use and other use and
therefore filter and adjust content selectively
-rw-r--r-- | include/markdown.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/markdown.php b/include/markdown.php index ccd108c1b..530af57a0 100644 --- a/include/markdown.php +++ b/include/markdown.php @@ -151,7 +151,7 @@ function bb_to_markdown_share($match) { -function bb_to_markdown($Text) { +function bb_to_markdown($Text, $options = []) { /* * Transform #tags, strip off the [url] and replace spaces with underscore @@ -168,9 +168,11 @@ function bb_to_markdown($Text) { $Text = preg_replace_callback("/\[share(.*?)\](.*?)\[\/share\]/ism", 'bb_to_markdown_share', $Text); + $x = [ 'bbcode' => $Text, 'options' => $options ]; - call_hooks('bb_to_markdown_bb',$Text); + call_hooks('bb_to_markdown_bb',$x); + $Text = $x['bbcode']; // Convert it to HTML - don't try oembed $Text = bbcode($Text, $preserve_nl, false); |