Various corrections
This commit is contained in:
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user