Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/templates/view.list.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

?>
<li id="<?= $result_nr ?>">
<div class="title"><a class="title" href="<?= $url_openfile ?>"><?= $title ?></a>
<div class="title"><a class="title" href="<?= str_replace('#', '%23', $url_openfile) ?>"><?= $title ?></a>
</div>
<div class="date"><?= $datetime ?></div>
<div>
Expand Down
10 changes: 5 additions & 5 deletions src/templates/view.preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function print_field($doc, $field, $preview_link='?view=preview&q=id:') {


<div class="row">
<h1><a class="title" target="_blank" href="<?= $url_openfile ?>"><?= $title ?></a>
<h1><a class="title" target="_blank" href="<?= str_replace('#', '%23', $url_openfile) ?>"><?= $title ?></a>
</h1>
</div>

Expand Down Expand Up @@ -425,7 +425,7 @@ function preview_show_prev_page() {
<?php
} else { // no thumbnails
?>
<embed id="pdf" src="<?= $url_openfile ?>#search=<?= rawurlencode($highlightings) ?>" type="application/pdf" width="100%" height="100%" />
<embed id="pdf" src="<?= str_replace('#', '%23', $url_openfile) ?>#search=<?= rawurlencode($highlightings) ?>" type="application/pdf" width="100%" height="100%" />

<?php
} // no thumbnails
Expand All @@ -434,19 +434,19 @@ function preview_show_prev_page() {

// if image
if (strpos($type, 'image') === 0) { ?>
<a href="<?= $url_openfile ?>" target="_blank"><img src="<?= $url_openfile ?>"/></a>
<a href="<?= str_replace('#', '%23', $url_openfile) ?>" target="_blank"><img src="<?= str_replace('#', '%23', $url_openfile) ?>"/></a>
<?php
} // if image

// if video
if (strpos($type, 'video') === 0) { ?>
<video controls="controls" src="<?= $url_openfile ?>"></video>
<video controls="controls" src="<?= str_replace('#', '%23', $url_openfile) ?>"></video>
<?php
} // if video

// if audio
if (strpos($type, 'audio') === 0) { ?>
<audio controls="controls" src="<?= $url_openfile ?>"></audio>
<audio controls="controls" src="<?= str_replace('#', '%23', $url_openfile) ?>"></audio>
<?php
} // if audio ?>

Expand Down