diff --git a/functions.php b/functions.php
index a5583e729..54385a4a7 100644
--- a/functions.php
+++ b/functions.php
@@ -3629,9 +3629,11 @@
}
if (get_pref($link, "STRIP_IMAGES", $owner)) {
-
$res = preg_replace('/]+>/is', '', $res);
+ }
+ if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
+ $res = preg_replace("/href=/i", "target=\"_blank\" href=", $res);
}
return $res;
@@ -4612,12 +4614,6 @@
if ($result) {
- $link_target = "";
-
- if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
- $link_target = "target=\"_blank\"";
- }
-
$line = db_fetch_assoc($result);
if ($line["icon_url"]) {
@@ -4635,10 +4631,10 @@
} else {
$comments_url = $line["link"];
}
- $entry_comments = "$num_comments comments";
+ $entry_comments = "$num_comments comments";
} else {
if ($line["comments"] && $line["link"] != $line["comments"]) {
- $entry_comments = "comments";
+ $entry_comments = "comments";
}
}
@@ -4669,7 +4665,7 @@
print "