This commit is contained in:
William 2022-03-02 07:15:20 +01:00
parent e89e49b4a1
commit b1eace9941
2 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,9 @@
<?php
// Escape values
foreach ($team as $key => $value) {
$team[$key] = htmlspecialchars($value);
}
?>
<h1>Endre lagdetaljer</h1> <h1>Endre lagdetaljer</h1>
<p>Her kan du oppdatere informasjonen om laget</p> <p>Her kan du oppdatere informasjonen om laget</p>
<form method="post" autocomplete="off"> <form method="post" autocomplete="off">

View File

@ -146,12 +146,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST')
} }
} }
// Escape all values
foreach ($currentTeam as $key => $value)
{
$currentTeam[$key] = htmlspecialchars($currentTeam[$key]);
}
$app->view('template/header', ['title' => 'Endre lagdetaljer']); $app->view('template/header', ['title' => 'Endre lagdetaljer']);
$app->view('pages/teamtable/edit/update', ["team" => $currentTeam]); $app->view('pages/teamtable/edit/update', ["team" => $currentTeam]);
$app->view('template/footer'); $app->view('template/footer');