aboutsummaryrefslogtreecommitdiff
path: root/views/default/output
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-30 19:46:56 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-30 19:46:56 +0000
commitb60c540bccaeb39704418a3d458427730e06c42d (patch)
treee62c9bf9a6c5a0e4651bf7ae4415c082f244d441 /views/default/output
parent0d76969678e45b79fd95ff04f95f2572c2b568cd (diff)
downloadelgg-b60c540bccaeb39704418a3d458427730e06c42d.tar.gz
elgg-b60c540bccaeb39704418a3d458427730e06c42d.tar.bz2
more html validation cleanup
git-svn-id: http://code.elgg.org/elgg/trunk@7776 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/output')
-rw-r--r--views/default/output/confirmlink.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/views/default/output/confirmlink.php b/views/default/output/confirmlink.php
index 5cb9aa52e..6d575b9ae 100644
--- a/views/default/output/confirmlink.php
+++ b/views/default/output/confirmlink.php
@@ -9,15 +9,15 @@
* @uses $vars['text'] The text of the link
* @uses $vars['href'] The address
* @uses $vars['confirm'] The dialog text
- * @uses $vars['encode'] Encode special characters?
+ * @uses $vars['text_encode'] Encode special characters?
*/
$confirm = elgg_get_array_value('confirm', $vars, elgg_echo('question:areyousure'));
-$encode = elgg_get_array_value('encode', $vars, true);
+$encode = elgg_get_array_value('text_encode', $vars, true);
// always generate missing action tokens
-$link = elgg_add_action_tokens_to_url(elgg_normalize_url($vars['href']));
+$vars['href'] = elgg_add_action_tokens_to_url(elgg_normalize_url($vars['href']), true);
$text = elgg_get_array_value('text', $vars, '');
if ($encode) {
@@ -29,7 +29,12 @@ if (isset($vars['class']) && $vars['class']) {
} else {
$class = '';
}
-?>
-<a href="<?php echo $link; ?>" <?php echo $class; ?> onclick="return confirm('<?php echo addslashes($confirm); ?>');">
- <?php echo $text; ?>
-</a>
+
+$vars['onclick'] = "return confirm('" . addslashes($confirm) . "')";
+
+unset($vars['encode_text']);
+unset($vars['text']);
+unset($vars['confirm']);
+
+$attributes = elgg_format_attributes($vars);
+echo "<a $attributes>$text</a>";