Problems: Allow HTML in description (#1559)

* Problems: allow HTML in problem description, closes #1557

* Don't replace new line with <br>

* Replace line brakes with <br> if allowDangerousHTML enabled

* List layout: only show html formatted description if option is enabled
This commit is contained in:
Alexander Zobnin
2023-01-20 15:11:12 +01:00
committed by GitHub
parent a5c239f77b
commit bc62e35477
6 changed files with 58 additions and 14 deletions

View File

@@ -96,7 +96,7 @@ export const ProblemsPanel = (props: ProblemsPanelProps): JSX.Element => {
}
// Handle multi-line description
if (trigger.comments) {
if (trigger.comments && options.allowDangerousHTML) {
trigger.comments = trigger.comments.replace('\n', '<br>');
}