issue #607 parens not recognised inside urls
This commit is contained in:
parent
83a4999dbe
commit
6552ccc477
@ -553,8 +553,8 @@ class Item extends \Zotlabs\Web\Controller {
|
|||||||
$body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','\red_escape_codeblock',$body);
|
$body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','\red_escape_codeblock',$body);
|
||||||
|
|
||||||
|
|
||||||
$body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", 'nakedoembed', $body);
|
$body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,\(\)]+)/ism", 'nakedoembed', $body);
|
||||||
$body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", '\red_zrl_callback', $body);
|
$body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,\(\)]+)/ism", '\red_zrl_callback', $body);
|
||||||
|
|
||||||
$body = preg_replace_callback('/\[\$b64zrl(.*?)\[\/(zrl)\]/ism','\red_unescape_codeblock',$body);
|
$body = preg_replace_callback('/\[\$b64zrl(.*?)\[\/(zrl)\]/ism','\red_unescape_codeblock',$body);
|
||||||
$body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','\red_unescape_codeblock',$body);
|
$body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','\red_unescape_codeblock',$body);
|
||||||
|
@ -115,6 +115,7 @@ class Tokens {
|
|||||||
$desc2 = t('You may also provide <em>dropbox</em> style access links to friends and associates by adding the Login Password to any specific site URL as shown. Examples:');
|
$desc2 = t('You may also provide <em>dropbox</em> style access links to friends and associates by adding the Login Password to any specific site URL as shown. Examples:');
|
||||||
|
|
||||||
$global_perms = \Zotlabs\Access\Permissions::Perms();
|
$global_perms = \Zotlabs\Access\Permissions::Perms();
|
||||||
|
$their_perms = [];
|
||||||
|
|
||||||
$existing = get_all_perms(local_channel(),(($atoken_xchan) ? $atoken_xchan : ''));
|
$existing = get_all_perms(local_channel(),(($atoken_xchan) ? $atoken_xchan : ''));
|
||||||
|
|
||||||
@ -123,7 +124,6 @@ class Tokens {
|
|||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
dbesc($atoken_xchan)
|
dbesc($atoken_xchan)
|
||||||
);
|
);
|
||||||
$their_perms = array();
|
|
||||||
if($theirs) {
|
if($theirs) {
|
||||||
foreach($theirs as $t) {
|
foreach($theirs as $t) {
|
||||||
$their_perms[$t['k']] = $t['v'];
|
$their_perms[$t['k']] = $t['v'];
|
||||||
|
@ -703,7 +703,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
|
|||||||
|
|
||||||
// Perform URL Search
|
// Perform URL Search
|
||||||
|
|
||||||
$urlchars = '[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,\@]';
|
$urlchars = '[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,\@\(\)]';
|
||||||
|
|
||||||
if (strpos($Text,'http') !== false) {
|
if (strpos($Text,'http') !== false) {
|
||||||
if($tryoembed) {
|
if($tryoembed) {
|
||||||
|
Reference in New Issue
Block a user