turn naked links in posts into zrl's if we've got a hubloc for the site

This commit is contained in:
friendica
2013-04-18 17:55:35 -07:00
parent ba1cb0bb05
commit db038c5654
5 changed files with 34 additions and 3 deletions
+7
View File
@@ -320,6 +320,13 @@ function item_post(&$a) {
}
/**
* fix naked links by passing through a callback to see if this is a red site
* (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);
/**
*
* When a photo was uploaded into the message using the (profile wall) ajax