public function previewAction()
{
$response = new Response();
if ($this->request->isPost()) {
if ($this->session->get('identity')) {
$content = $this->request->getPost('content');
$response->setContent($this->markdown->render($this->escaper->escapeHtml($content)));
}
}
return $response;
}