summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/controllers/file.php5
-rw-r--r--application/views/file/upload_history.php2
2 files changed, 6 insertions, 1 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index 79d5395ae..1f07ae4ec 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -764,6 +764,11 @@ class File extends MY_Controller {
foreach($history["items"] as $key => $item) {
$history["items"][$key]["filesize"] = format_bytes($item["filesize"]);
+
+ if (isset($item['preview_text'])) {
+ $history["items"][$key]["preview_text"] = htmlentities($item['preview_text']);
+ }
+
if (is_cli_client()) {
// Keep track of longest string to pad plaintext output correctly
foreach($fields as $length_key => $value) {
diff --git a/application/views/file/upload_history.php b/application/views/file/upload_history.php
index 1e7ecfa62..7d46efe3a 100644
--- a/application/views/file/upload_history.php
+++ b/application/views/file/upload_history.php
@@ -16,7 +16,7 @@
<?php foreach($items as $key => $item): ?>
<tr>
<td><input type="checkbox" name="ids[<?php echo $item["id"] ?>]" value="<?php echo $item["id"] ?>" class="delete-history"></td>
- <td><a href="<?php echo site_url("/".$item["id"]) ?>/"><?php echo $item["id"] ?></a></td>
+ <td><a href="<?php echo site_url("/".$item["id"]) ?>/" data-content="<?php if (isset($item['preview_text'])) {echo htmlentities($item['preview_text']);} ?>"><?php echo $item["id"] ?></a></td>
<td class="wrap"><?php echo htmlspecialchars($item["filename"]); ?></td>
<td><?php echo $item["mimetype"] ?></td>
<td class="nowrap" data-sort-value="<?=$item["date"]; ?>"><?php echo date("r", $item["date"]); ?></td>