if (is_int($vars['value'])) {
echo date("F j, Y", $vars['value']);
} else {
- echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
+ echo htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8');
}
\ No newline at end of file
$class = '';
}
?>
-<a href="<?php echo $link; ?>" <?php echo $class; ?> onclick="return confirm('<?php echo addslashes($confirm); ?>');"><?php echo htmlentities($vars['text'], ENT_QUOTES, 'UTF-8'); ?></a>
+<a href="<?php echo $link; ?>" <?php echo $class; ?> onclick="return confirm('<?php echo addslashes($confirm); ?>');"><?php echo htmlspecialchars($vars['text'], ENT_QUOTES, 'UTF-8'); ?></a>
*/
if (!empty($vars['value'])) {
- echo "<a href=\"mailto:" . $vars['value'] . "\">". htmlentities($vars['value'], ENT_QUOTES, 'UTF-8') ."</a>";
+ echo "<a href=\"mailto:" . $vars['value'] . "\">". htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8') ."</a>";
}
\ No newline at end of file
*/
$friendly_time = elgg_get_friendly_time($vars['time']);
-$timestamp = htmlentities(date(elgg_echo('friendlytime:date_format'), $vars['time']));
+$timestamp = htmlspecialchars(date(elgg_echo('friendlytime:date_format'), $vars['time']));
echo "<acronym title=\"$timestamp\">$friendly_time</acronym>";
*
*/
-echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); //$vars['value'];
\ No newline at end of file
+echo htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8'); //$vars['value'];
\ No newline at end of file
$size = 100;
}
$url = elgg_get_site_url()."pg/search/?q=". urlencode($tag->tag) . "&search_type=tags$type$subtype";
- $list .= "<a href=\"$url\" style=\"font-size: $size%\" title=\"".addslashes($tag->tag)." ($tag->total)\" style=\"text-decoration:none;\">" . htmlentities($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>";
+ $list .= "<a href=\"$url\" style=\"font-size: $size%\" title=\"".addslashes($tag->tag)." ($tag->total)\" style=\"text-decoration:none;\">" . htmlspecialchars($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>";
}
$cloud .= "$list</div>";
$type = "";
}
if (is_string($tag)) {
- $tagstr .= "<a rel=\"tag\" href=\"".elgg_get_site_url()."pg/search/?q=".urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}\">" . htmlentities($tag, ENT_QUOTES, 'UTF-8') . "</a>";
+ $tagstr .= "<a rel=\"tag\" href=\"".elgg_get_site_url()."pg/search/?q=".urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}\">" . htmlspecialchars($tag, ENT_QUOTES, 'UTF-8') . "</a>";
}
}
echo $tagstr;
*
*/
-echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); // $vars['value'];
\ No newline at end of file
+echo htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8'); // $vars['value'];
\ No newline at end of file
* @subpackage Core
*
* @uses string $vars['text'] The string between the <a></a> tags.
- * @uses bool $vars['encode_text'] Run $vars['text'] through htmlentities()?
+ * @uses bool $vars['encode_text'] Run $vars['text'] through htmlspecialchars()?
* @uses bool $vars['is_action'] Is this a link to an action?
*
*/
if (!empty($url)) {\r
if (isset($vars['text'])) {
if (isset($vars['encode_text']) && $vars['encode_text']) {
- $text = htmlentities($vars['text'], ENT_QUOTES, 'UTF-8');
+ $text = htmlspecialchars($vars['text'], ENT_QUOTES, 'UTF-8');
} else {
$text = $vars['text'];
}
unset($vars['text']);
} else {
- $text = htmlentities($url, ENT_QUOTES, 'UTF-8');
+ $text = htmlspecialchars($url, ENT_QUOTES, 'UTF-8');
}
unset($vars['encode_text']);