summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--data/config.default.php18
-rw-r--r--data/templates/sscuttlizr/bookmarks.tpl.php13
2 files changed, 29 insertions, 2 deletions
diff --git a/data/config.default.php b/data/config.default.php
index bb9eddb..791eb7a 100644
--- a/data/config.default.php
+++ b/data/config.default.php
@@ -364,6 +364,24 @@ $longdate = 'j F Y';
$nofollow = true;
/**
+ * Include rel="noreferer" attribute on bookmark links to prevent them from
+ * specifying your site as the one that referred to the page.
+ */
+$noreferrer = true;
+
+/**
+ * Include rel="noopener" attribute on bookmark links to prevent them from
+ * giving the opening page access to your site through the window.opener
+ * property.
+ */
+$noopener = true;
+
+/**
+ * Include target="_blank" to open links in a new window or tab.
+ */
+$openLinksInNewWindow = false;
+
+/**
* Default number of bookmarks per page.
* -1 means no limit.
*
diff --git a/data/templates/sscuttlizr/bookmarks.tpl.php b/data/templates/sscuttlizr/bookmarks.tpl.php
index cb062a4..2df30db 100644
--- a/data/templates/sscuttlizr/bookmarks.tpl.php
+++ b/data/templates/sscuttlizr/bookmarks.tpl.php
@@ -415,8 +415,14 @@ if ($currenttag!= '') {
// Nofollow option
$rel = '';
if ($GLOBALS['nofollow']) {
- $rel = ' rel="nofollow"';
+ $rel .= ' nofollow ';
}
+ if ($GLOBALS['noreferrer']) {
+ $rel .= ' noreferrer ';
+ }
+ if ($GLOBALS['noopener']) {
+ $rel .= ' noopener ';
+ }
$address = $row['bAddress'];
$oaddress = $address;
@@ -465,7 +471,10 @@ if ($currenttag!= '') {
echo ' <div' . $adminBgClass . '>' . "\n";
echo ' <div class="link">'
- . '<a href="'. htmlspecialchars($address) .'"'. $rel .' class="taggedlink">'
+ . ('<a href="' . htmlspecialchars($address) . '"'
+ . ($rel ? ' rel="' . trim($rel) . '"' : "")
+ . ($GLOBALS['openLinksInNewWindow'] ? ' target="_blank"' : '')
+ . ' class="taggedlink">')
. filter($row['bTitle'])
. '</a>' . $adminStar . "</div>\n";
if ($row['bDescription'] == '') {