X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fbbcode.php;h=cad7ddc9251df74ca149e7713efcf341c5d541f2;hb=b4d14164bb47a76e62977447816fae5b65ea4da7;hp=ffc2387c3b5a2277aa747df9e634b936fdee834c;hpb=5d20bbaace63fc046e92c590e445e9a2d9b3f490;p=friendica.git
diff --git a/include/bbcode.php b/include/bbcode.php
index ffc2387c3b..cad7ddc925 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -3,6 +3,7 @@
use Friendica\App;
use Friendica\Content\Smilies;
use Friendica\Content\OEmbed;
+use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\System;
use Friendica\Core\Config;
@@ -970,11 +971,9 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
if (!$forplaintext) {
// Autolink feature (thanks to http://code.seebz.net/p/autolink-php/)
$autolink_regex = "`([^\]\=\"']|^)(https?\://[^\s<]+[^\s<\.\)])`ism";
- if ($simplehtml != 7) {
- $Text = preg_replace($autolink_regex, '$1$2', $Text);
- } else {
- $Text = preg_replace($autolink_regex, '$1[url]$2[/url]', $Text);
-
+ $autolink_regex = "/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism";
+ $Text = preg_replace($autolink_regex, '$1[url]$2[/url]', $Text);
+ if ($simplehtml == 7) {
$Text = preg_replace_callback("/\[url\]([$URLSearchString]*)\[\/url\]/ism", 'bb_style_url', $Text);
$Text = preg_replace_callback("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", 'bb_style_url', $Text);
}
@@ -1046,7 +1045,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
$Text = preg_replace($expression, System::baseUrl()."/display/$1", $Text);
if ($tryoembed) {
- $Text = preg_replace_callback("/\[url\]([$URLSearchString]*)\[\/url\]/ism", $tryoembed_callback, $Text);
+ // $Text = preg_replace_callback("/\[url\]([$URLSearchString]*)\[\/url\]/ism", $tryoembed_callback, $Text);
}
$Text = preg_replace("/([#])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
@@ -1401,7 +1400,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
//$Text = str_replace('