Various corrections

This commit is contained in:
julien
2026-03-09 15:48:45 +01:00
parent 5b37d2bcd8
commit edb1752f32
6 changed files with 72 additions and 9 deletions

View File

@@ -71,6 +71,9 @@ $db->pdo->exec("
)
");
// Sanitizer HTML
$htmlSanitizer = new \App\Services\HtmlSanitizer();
// ============================================
// Slim App
// ============================================
@@ -83,7 +86,7 @@ $app->add(TwigMiddleware::create($app, $twig));
// Routes
// ============================================
$controller = new PostController($twig, $db);
$controller = new PostController($twig, $db, $htmlSanitizer);
$app->get('/', [$controller, 'index']);
$app->get('/article/{slug}', [$controller, 'show']);