make all naked links bookmark-able

This commit is contained in:
friendica 2014-02-06 16:22:40 -08:00
parent a46fa1fbae
commit 9b2dc9b87c
2 changed files with 2 additions and 2 deletions

View File

@ -161,7 +161,7 @@ function red_zrl_callback($matches) {
}
if($zrl)
return $matches[1] . '#^[zrl=' . $matches[2] . ']' . $matches[2] . '[/zrl]';
return $matches[0];
return $matches[1] . '#^[url=' . $matches[2] . ']' . $matches[2] . '[/url]';
}

View File

@ -425,7 +425,7 @@ function item_post(&$a) {
* (already known to us) which will get a zrl, otherwise link with url
*/
$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);
/**
*