]> git.mxchange.org Git - friendica.git/commitdiff
remote links
authorFriendika <info@friendika.com>
Thu, 27 Jan 2011 22:34:11 +0000 (14:34 -0800)
committerFriendika <info@friendika.com>
Thu, 27 Jan 2011 22:34:11 +0000 (14:34 -0800)
boot.php
include/bbcode.php

index 36530736dd3ba0cb8e9a107bbf451bb045bd569a..e984489e7cb63cae51f0c509f455ae18c280a6b1 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1878,7 +1878,7 @@ function aes_encrypt($val,$ky)
 
 if(! function_exists('linkify')) {
 function linkify($s) {
-       $s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" >$1</a>', $s);
+       $s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" target="external-link">$1</a>', $s);
        return($s);
 }}
 
index 9e5f5a3711c7504adea322981253c70de7f9f480..8382cc80441f5e73dff5cd6a9d9b801a93a6599d 100644 (file)
@@ -22,10 +22,10 @@ function bbcode($Text) {
        // Perform URL Search
 
 
-       $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]+)/", ' <a href="$2" >$2</a>', $Text);
+       $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]+)/", ' <a href="$2" target="external-link">$2</a>', $Text);
 
-       $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '<a href="$1" >$1</a>', $Text);
-       $Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '<a href="$1" >$2</a>', $Text);
+       $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '<a href="$1" target="external-link">$1</a>', $Text);
+       $Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '<a href="$1" target="external-link">$2</a>', $Text);
        //$Text = preg_replace("(\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[/url\])", '<a href="$1" target="_blank">$2</a>', $Text);