aboutsummaryrefslogtreecommitdiff
path: root/views/default
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
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')
-rw-r--r--views/default/graphics/icon.php2
-rw-r--r--views/default/output/confirmlink.php19
-rw-r--r--views/default/profile/hover.php2
3 files changed, 14 insertions, 9 deletions
diff --git a/views/default/graphics/icon.php b/views/default/graphics/icon.php
index 226287d6e..06e866d33 100644
--- a/views/default/graphics/icon.php
+++ b/views/default/graphics/icon.php
@@ -35,7 +35,7 @@ if ($vars['link']) {
?><a href="<?php echo $vars['link'] ?>"><?php
}
?>
-<img src="<?php echo $entity->getIcon($vars['size']); ?>" border="0" <?php echo $align; ?> <?php echo $vars['js']; ?> />
+<img src="<?php echo $entity->getIcon($vars['size']); ?>" <?php echo $align; ?> <?php echo $vars['js']; ?> />
<?php
if ($vars['link']) {
?></a><?php
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>";
diff --git a/views/default/profile/hover.php b/views/default/profile/hover.php
index 756a5838c..689d4dc47 100644
--- a/views/default/profile/hover.php
+++ b/views/default/profile/hover.php
@@ -6,7 +6,7 @@
?>
<div class="avatar_menu_button">
- <img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" border="0" width="15" height="15" />
+ <img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="15" height="15" />
</div>
<?php