Escape strings from iCal
This commit is contained in:
parent
3d9835ba0b
commit
160ee3b2ca
@ -58,7 +58,6 @@ $events = array_slice($events, 1);
|
|||||||
$locale = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
$locale = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||||
if ($locale !== null){
|
if ($locale !== null){
|
||||||
setlocale(LC_TIME, $locale);
|
setlocale(LC_TIME, $locale);
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@ -94,7 +93,7 @@ if ($locale !== null){
|
|||||||
<h5 class="card-title">Events</h5>
|
<h5 class="card-title">Events</h5>
|
||||||
<h6 class="card-subtitle mb-2 text-muted">Nächste Veranstaltung</h6>
|
<h6 class="card-subtitle mb-2 text-muted">Nächste Veranstaltung</h6>
|
||||||
<p class="card-text">
|
<p class="card-text">
|
||||||
<h5 class="font-weight-bold"><?= $first_event->summary ?></h5>
|
<h5 class="font-weight-bold"><?= htmlspecialchars($first_event->summary, ENT_QUOTES, 'UTF-8') ?></h5>
|
||||||
<span class="font-weight-normal"><?= $ical->iCalDateToDateTime($first_event->dtstart_array[3])->format('Y-m-d H:i'); ?></span>
|
<span class="font-weight-normal"><?= $ical->iCalDateToDateTime($first_event->dtstart_array[3])->format('Y-m-d H:i'); ?></span>
|
||||||
</p>
|
</p>
|
||||||
<h5 class="card-title">Danach:</h5>
|
<h5 class="card-title">Danach:</h5>
|
||||||
@ -103,7 +102,7 @@ if ($locale !== null){
|
|||||||
<?php foreach ($events as $event) : ?>
|
<?php foreach ($events as $event) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?= $ical->iCalDateToDateTime($event->dtstart_array[3])->format('Y-m-d H:i') ?></th>
|
<th scope="row"><?= $ical->iCalDateToDateTime($event->dtstart_array[3])->format('Y-m-d H:i') ?></th>
|
||||||
<td><?= $event->summary ?></td>
|
<td><?= htmlspecialchars($event->summary) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -118,6 +117,9 @@ if ($locale !== null){
|
|||||||
<div>
|
<div>
|
||||||
Look at the code <a href="https://git.iwonder.name/iwonder/dorf.jetzt">here</a>
|
Look at the code <a href="https://git.iwonder.name/iwonder/dorf.jetzt">here</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
Report issues to <a href="mailto:help@dorf.jetzt">help@dorf.jetzt</a>
|
||||||
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="assets/js/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
|
<script src="assets/js/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user