diff options
author | Friendika <info@friendika.com> | 2011-01-27 14:34:11 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-01-27 14:34:11 -0800 |
commit | ebba294189d87c0016f2fd33a7bacf8c08090d66 (patch) | |
tree | 83135c01287dd7de34edeb1e325585a26449712c | |
parent | 58309829a1fd45b7dec6ac0f0ca9290a7d0b0721 (diff) | |
download | volse-hubzilla-ebba294189d87c0016f2fd33a7bacf8c08090d66.tar.gz volse-hubzilla-ebba294189d87c0016f2fd33a7bacf8c08090d66.tar.bz2 volse-hubzilla-ebba294189d87c0016f2fd33a7bacf8c08090d66.zip |
remote links
-rw-r--r-- | boot.php | 2 | ||||
-rw-r--r-- | include/bbcode.php | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -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); |