aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/url.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/output/url.php')
-rw-r--r--views/default/output/url.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/views/default/output/url.php b/views/default/output/url.php
index 07b5622bf..454b7fc70 100644
--- a/views/default/output/url.php
+++ b/views/default/output/url.php
@@ -19,7 +19,18 @@
if (!empty($val)) {
if ((substr_count($val, "http://") == 0) && (substr_count($val, "https://") == 0)) {
$val = "http://" . $val;
- }
+ }
+
+ if ($vars['is_action'])
+ {
+ $ts = time();
+ $token = generate_action_token($ts);
+
+ $sep = "?";
+ if (strpos($val, '?')>0) $sep = "&";
+ $val = "$val{$sep}__elgg_token=$token&__elgg_ts=$ts";
+ }
+
echo "<a href=\"{$val}\" target=\"_blank\">". htmlentities($val, ENT_QUOTES, 'UTF-8'). "</a>";
}