aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-10-14 14:22:01 -0700
committerzotlabs <mike@macgirvin.com>2016-10-14 14:22:01 -0700
commit3f7f5f9429873118ee51d7c8f4513be837b8d9ef (patch)
tree682b12ae3d493366b2a23bf5339cef247c2e3e9c
parent5d9cf6a6d7cf1bbd94e20f1fba05434560d5f1ed (diff)
downloadvolse-hubzilla-3f7f5f9429873118ee51d7c8f4513be837b8d9ef.tar.gz
volse-hubzilla-3f7f5f9429873118ee51d7c8f4513be837b8d9ef.tar.bz2
volse-hubzilla-3f7f5f9429873118ee51d7c8f4513be837b8d9ef.zip
remove corporate codes from diaspora2bb, add plugin hook markdown_to_bb
-rw-r--r--include/bb2diaspora.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index d3f88e17c..9bc6eaf9f 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -161,17 +161,14 @@ function diaspora2bb($s, $use_zrl = false) {
$s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url=$2$3]$2$3[/url]',$s);
}
- //$s = preg_replace("/([^\]\=]|^)(https?\:\/\/)(vimeo|youtu|www\.youtube|soundcloud)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url=$2$3$4]$2$3$4[/url]',$s);
- $s = bb_tag_preg_replace("/\[url\=?(.*?)\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/url\]/ism",'[embed]https://www.youtube.com/watch?v=$2[/embed]','url',$s);
- $s = bb_tag_preg_replace("/\[url\=https?:\/\/www.youtube.com\/watch\?v\=(.*?)\].*?\[\/url\]/ism",'[embed]https://www.youtube.com/watch?v=$1[/embed]','url',$s);
- $s = bb_tag_preg_replace("/\[url\=?(.*?)\]https?:\/ \/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[embed]https://vimeo.com/$2[/embed]','url',$s);
- $s = bb_tag_preg_replace("/\[url\=https?:\/\/vimeo.com\/([0-9]+)\](.*?)\[\/url\]/ism",'[embed]https://vimeo.com/$1[/embed]','url',$s);
// remove duplicate adjacent code tags
$s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s);
// Don't show link to full picture (until it is fixed)
$s = scale_external_images($s, false);
+ call_hooks('markdown_to_bb',$s);
+
return $s;
}