fix several rendering issues in markdown (#3588)

- fix double escaping of html entities: " instead of "
- fix table is missing css class "table"
- fix quotes are not rendered
This commit is contained in:
Kevin Papst
2022-10-19 21:17:49 +02:00
committed by GitHub
parent 6d7054c18c
commit 73ef090b9e
4 changed files with 18 additions and 7 deletions

View File

@@ -63,7 +63,7 @@ final class MarkdownExtension implements RuntimeExtensionInterface
if ($this->isMarkdownEnabled()) {
$content = $this->markdown->toHtml($content);
} elseif ($fullLength) {
$content = '<p>' . nl2br($content) . '</p>';
$content = '<p>' . nl2br(htmlspecialchars($content)) . '</p>';
}
return $content;
@@ -115,7 +115,7 @@ final class MarkdownExtension implements RuntimeExtensionInterface
return $this->markdown->toHtml($content);
}
return nl2br($content);
return nl2br(htmlspecialchars($content));
}
/**