Revert "Merge branch 'dev' into 'dev'"
This reverts merge request !1694
This commit is contained in:
parent
4e3a0720c3
commit
5695350e98
@ -51,7 +51,7 @@ function profile_activity($changed, $value) {
|
||||
|
||||
if($t == 1 && strlen($value)) {
|
||||
// if it's a url, the HTML quotes will mess it up, so link it and don't try and zidify it because we don't know what it points to.
|
||||
$value = preg_replace_callback("/([^\]\='".'"'."]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)([\,\.\:\;]\s|$)/ismu", 'red_zrl_callback', $value);
|
||||
$value = preg_replace_callback("/([^\]\='".'"'."]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ismu", 'red_zrl_callback', $value);
|
||||
// take out the bookmark indicator
|
||||
if(substr($value,0,2) === '#^')
|
||||
$value = str_replace('#^','',$value);
|
||||
|
@ -70,7 +70,7 @@ function bb_tag_preg_replace($pattern, $replace, $name, $s) {
|
||||
|
||||
|
||||
function tryoembed($match) {
|
||||
$url = ((count($match) == 3) ? $match[1] : $match[2]);
|
||||
$url = ((count($match) == 2) ? $match[1] : $match[2]);
|
||||
|
||||
$o = oembed_fetch_url($url);
|
||||
|
||||
|
@ -3405,10 +3405,10 @@ function cleanup_bbcode($body) {
|
||||
$body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','\red_escape_codeblock',$body);
|
||||
|
||||
$body = preg_replace_callback("/([^\]\='".'"'."\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
|
||||
+\,\(\)]+)([\,\.\:\;]\s|$)/ismu", '\nakedoembed', $body);
|
||||
+\,\(\)]+)/ismu", '\nakedoembed', $body);
|
||||
|
||||
$body = preg_replace_callback("/([^\]\='".'"'."\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
|
||||
+\,\(\)]+)([\,\.\:\;]\s|$)/ismu", '\red_zrl_callback', $body);
|
||||
+\,\(\)]+)/ismu", '\red_zrl_callback', $body);
|
||||
|
||||
|
||||
$body = preg_replace_callback('/\[\$b64zrl(.*?)\[\/(zrl)\]/ism','\red_unescape_codeblock',$body);
|
||||
|
@ -216,9 +216,9 @@ function red_zrl_callback($matches) {
|
||||
if($matches[1] === '#^')
|
||||
$matches[1] = '';
|
||||
if($zrl)
|
||||
return $matches[1] . '#^[zrl=' . $matches[2] . ']' . $matches[2] . '[/zrl]' . $matches[3];
|
||||
return $matches[1] . '#^[zrl=' . $matches[2] . ']' . $matches[2] . '[/zrl]';
|
||||
|
||||
return $matches[1] . '#^[url=' . $matches[2] . ']' . $matches[2] . '[/url]' . $matches[3];
|
||||
return $matches[1] . '#^[url=' . $matches[2] . ']' . $matches[2] . '[/url]';
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user