1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Use rel=noreferrer in WebKit

This commit is contained in:
Jakub Vrana
2014-03-26 08:58:28 -07:00
parent ba7af8e31c
commit 96c8e6fb71
2 changed files with 4 additions and 3 deletions

View File

@@ -1107,9 +1107,9 @@ function select_value($val, $link, $field, $text_length) {
$link = "mailto:$val";
}
if ($protocol = is_url($val)) {
$link = ($protocol == "http" && $HTTPS
$link = (($protocol == "http" && $HTTPS) || preg_match('~WebKit~i', $_SERVER["HTTP_USER_AGENT"]) // WebKit supports noreferrer since 2009
? $val // HTTP links from HTTPS pages don't receive Referer automatically
: "$protocol://www.adminer.org/redirect/?url=" . urlencode($val) // intermediate page to hide Referer, may be changed to rel="noreferrer" in HTML5
: "$protocol://www.adminer.org/redirect/?url=" . urlencode($val) // intermediate page to hide Referer
);
}
}