diff --git a/protected/libs/HHtml.php b/protected/libs/HHtml.php
index 3839a81a77..c0b895a30f 100644
--- a/protected/libs/HHtml.php
+++ b/protected/libs/HHtml.php
@@ -164,8 +164,6 @@ class HHtml extends CHtml {
$maxOembedCount = 3; // Maximum OEmbeds
$oembedCount = 0; // OEmbeds used
-
-
$text = preg_replace_callback('/http(.*?)(\s|$)/i', function($match) use (&$oembedCount, &$maxOembedCount) {
// Try use oembed
@@ -177,14 +175,14 @@ class HHtml extends CHtml {
}
}
- return HHtml::link($match[0], $match[0]);
+ return HHtml::link($match[0], $match[0], array('target' => '_blank'));
}, $text);
# breaks links!?
#$text = nl2br($text);
-
- $text = str_replace("\n", "
\n", $text);
-
+
+ $text = str_replace("\n", "
\n", $text);
+
return $text;
}