Foreign keys, bugfixes and output sanitation
This commit is contained in:
@@ -488,7 +488,7 @@ if ($document->doctype == 'picture') {
|
||||
echo '<div class="image-gallery">';
|
||||
echo '<a href="#" data-bs-toggle="modal" data-bs-target="#imageModal">';
|
||||
// echo '<img width="', $g_thumb_size, '" src="dl.php?id=', $document->docid, '&t=s" alt="', $document->title, '">';
|
||||
echo '<img width="', $g_thumb_size, '" src="dl.php?id=', $document->docid, '" alt="', $document->title, '">';
|
||||
echo '<img width="', $g_thumb_size, '" src="dl.php?id=', $document->docid, '" alt="', h($document->title), '">';
|
||||
echo '</a>';
|
||||
echo '</div>'; // gallery
|
||||
?>
|
||||
@@ -535,11 +535,11 @@ if ($document->docsize == 0) {
|
||||
}
|
||||
|
||||
echo '<tr><th scope="row">', _('Mimetype'),"</th><td>", $document->mimetype, "</td></tr>\n";
|
||||
echo '<tr><th scope="row">', _('Filename'),"</th><td>", $document->filename, "</td></tr>\n";
|
||||
echo '<tr><th scope="row">', _('Filename'),"</th><td>", h($document->filename), "</td></tr>\n";
|
||||
echo '<tr><th scope="row">', _('File size'),"</th><td>", format_filesize($document->docsize), "</td></tr>\n";
|
||||
echo '<tr><th scope="row">', _('Upload date'),"</th><td>", $document->doctime, "</td></tr>\n";
|
||||
echo '<tr><th scope="row">', _('Title'),"</th><td>", $document->title, "</td></tr>\n";
|
||||
echo '<tr><th scope="row">', _('Remarks'),"</th><td>", $document->remarks, "</td></tr>\n";
|
||||
echo '<tr><th scope="row">', _('Title'),"</th><td>", h($document->title), "</td></tr>\n";
|
||||
echo '<tr><th scope="row">', _('Remarks'),"</th><td>", h($document->remarks, br:true), "</td></tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
echo "</div>\n", '<div class="col text-center">', "\n"; // column break
|
||||
@@ -780,7 +780,7 @@ if ($document->mimetype == 'application/pdf') {
|
||||
?>
|
||||
<div class="mb-3">
|
||||
<label for="remarks" class="form-label"><?=_('Remarks')?></label>
|
||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=$document->remarks ?></textarea>
|
||||
<textarea class="form-control" id="remarks" name="remarks" rows="3"><?=h($document->remarks, br:true)?></textarea>
|
||||
</div>
|
||||
<button type="submit" name="submit[update]" class="btn btn-primary"><?=_('Save')?></button>
|
||||
<a href="<?=$g_scriptname?>?f=view&id=<?=$id?>" class="btn btn-secondary"><?=_('Back')?></a>
|
||||
|
||||
Reference in New Issue
Block a user