From 4978ee12d10a9a18f9fc26795e09515ef6db7949 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 2 Jun 2012 18:05:23 -0700 Subject: webfinger profile linker --- include/bbcode.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index ba4863de1..efc362880 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -52,6 +52,8 @@ function bb_unspacefy_and_trim($st) { function bbcode($Text,$preserve_nl = false) { + $a = get_app(); + // Hide all [noparse] contained bbtags spacefying them $Text = preg_replace_callback("/\[noparse\](.*?)\[\/noparse\]/ism", 'bb_spacefy',$Text); @@ -114,6 +116,11 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$2', $Text); //$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '$2', $Text); + // we may need to restrict this further if it picks up too many strays + // link acct:user@host to a webfinger profile redirector + + $Text = preg_replace('/acct:(.*?)@(.*?)([ ,])/', 'acct:' . "$1@$2$3" . '',$Text); // Perform MAIL Search $Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '$1', $Text); -- cgit v1.2.3