<legend> <?php echo t('CONFIRM_DEL') ?> </legend>
<table>
<tr><td>
- <?php echo t('GONNA_DEL') . ' "' . htmlspecialchars($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ').' ?>
+ <?php echo t('GONNA_DEL') . ' "' . jirafeau_escape($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ').' ?>
</td></tr>
<tr><td>
<?php echo t('USING_SERIVCE'). ' <a href="tos.php">' . t('TOS') . '</a>.' ?>
echo '<div>' .
'<form action="f.php" method="post" id="submit_post" class="form download">'; ?>
<input type = "hidden" name = "jirafeau" value = "<?php echo JIRAFEAU_VERSION ?>"/><?php
- echo '<fieldset><legend>' . htmlspecialchars($link['file_name']) . '</legend><table>' .
+ echo '<fieldset><legend>' . jirafeau_escape($link['file_name']) . '</legend><table>' .
'<tr><td>' .
- t('NOW_DOWNLOADING') . ' "' . htmlspecialchars($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ').' .
+ t('NOW_DOWNLOADING') . ' "' . jirafeau_escape($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ').' .
'</td></tr>' .
'<tr><td>' .
t('USING_SERIVCE'). ' <a href="tos.php">' . t('TOS') . '</a>.' .
}
/* Filter. */
- if (!empty($name) && !preg_match("/$name/i", htmlspecialchars($l['file_name']))) {
+ if (!empty($name) && !preg_match("/$name/i", jirafeau_escape($l['file_name']))) {
continue;
}
if (!empty($file_hash) && $file_hash != $l['md5']) {
/* Print link informations. */
echo '<tr>';
echo '<td>' .
- '<strong><a id="upload_link" href="f.php?h='. htmlspecialchars($node) .'" title="' .
- t('DL_PAGE') . '">' . htmlspecialchars($l['file_name']) . '</a></strong>';
+ '<strong><a id="upload_link" href="f.php?h='. jirafeau_escape($node) .'" title="' .
+ t('DL_PAGE') . '">' . jirafeau_escape($l['file_name']) . '</a></strong>';
echo '</td>';
echo '<td>' . $l['mime_type'] . '</td>';
echo '<td>' . jirafeau_human_size($l['file_size']) . '</td>';
return $content;
}
+
+function jirafeau_escape($string)
+{
+ return htmlspecialchars($string, ENT_QUOTES);
+}