]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
more html validation cleanup
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 30 Dec 2010 19:46:56 +0000 (19:46 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 30 Dec 2010 19:46:56 +0000 (19:46 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7776 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/graphics/icon.php
views/default/output/confirmlink.php
views/default/profile/hover.php

index 226287d6ea13cdcb42a30c7caad9bda242a28b9f..06e866d3378221d989d6d8cf7c1e87c2caf3fa83 100644 (file)
@@ -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
index 5cb9aa52e00df7dd14a94b36d2594acf84b20e78..6d575b9ae57bd34cf00f09250b6c72d644c56902 100644 (file)
@@ -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>";
index 756a5838c3cb9dea083d5756fbe013902f4f6b8a..689d4dc474bfcd02a7f53579ee0958ec0d791787 100644 (file)
@@ -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