diff options
author | zotlabs <mike@macgirvin.com> | 2017-07-30 13:52:16 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-07-30 13:52:16 -0700 |
commit | 40effa441743fcbb8d62591421611a3193e352d4 (patch) | |
tree | 8e662fe308208cadd1409ea0f006d2b19d050745 /include | |
parent | 2ee0f769d90f424d2332708df8c86c7bc8390268 (diff) | |
download | volse-hubzilla-40effa441743fcbb8d62591421611a3193e352d4.tar.gz volse-hubzilla-40effa441743fcbb8d62591421611a3193e352d4.tar.bz2 volse-hubzilla-40effa441743fcbb8d62591421611a3193e352d4.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
Diffstat (limited to 'include')
-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); |