X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fbbcode.php;h=eb0806dc527fee8b6b36a89d6d6239e807ca665e;hb=26dfb73f48d4fcd4671d136e53f52bb81995ea34;hp=81b581cdbdde51672cf6277182afc1c1f2b1b196;hpb=6c0218563f9d1b88a2adbaaa875558d4c3abea0b;p=friendica.git
diff --git a/include/bbcode.php b/include/bbcode.php
index 81b581cdbd..eb0806dc52 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -1,5 +1,5 @@
$2', $Text);
+ $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]+)/", ' $2', $Text);
- $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '$1', $Text);
- $Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '$2', $Text);
+ $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '$1', $Text);
+ $Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '$2', $Text);
//$Text = preg_replace("(\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[/url\])", '$2', $Text);
@@ -93,6 +93,9 @@ function bbcode($Text) {
$Text = preg_replace("/\[youtube\]http:\/\/www.youtube.com\/watch\?v\=(.+?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text);
$Text = preg_replace("/\[youtube\](.+?)\[\/youtube\]/", '', $Text);
+ // oembed tag
+ $Text = oembed_bbcode2html($Text);
+
call_hooks('bbcode',$Text);
return $Text;