aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-01-27 14:34:11 -0800
committerFriendika <info@friendika.com>2011-01-27 14:34:11 -0800
commitebba294189d87c0016f2fd33a7bacf8c08090d66 (patch)
tree83135c01287dd7de34edeb1e325585a26449712c
parent58309829a1fd45b7dec6ac0f0ca9290a7d0b0721 (diff)
downloadvolse-hubzilla-ebba294189d87c0016f2fd33a7bacf8c08090d66.tar.gz
volse-hubzilla-ebba294189d87c0016f2fd33a7bacf8c08090d66.tar.bz2
volse-hubzilla-ebba294189d87c0016f2fd33a7bacf8c08090d66.zip
remote links
-rw-r--r--boot.php2
-rw-r--r--include/bbcode.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/boot.php b/boot.php
index 36530736d..e984489e7 100644
--- 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);
}}
diff --git a/include/bbcode.php b/include/bbcode.php
index 9e5f5a371..8382cc804 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -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);