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

Use noreferrer in external links

This commit is contained in:
Jakub Vrana
2014-03-21 22:32:31 -07:00
parent 6980d1a1d2
commit cd64b707bd
2 changed files with 2 additions and 2 deletions

View File

@@ -225,7 +225,7 @@ username.form['auth[driver]'].onchange();
if (preg_match('~blob|bytea|raw|file~', $field["type"]) && !is_utf8($val)) {
$return = lang('%d byte(s)', strlen($original));
}
return ($link ? "<a href='" . h($link) . "'>$return</a>" : $return);
return ($link ? "<a href='" . h($link) . "'" . (is_url($link) ? " rel='noreferrer'" : "") . ">$return</a>" : $return);
}
/** Value conversion used in select and edit