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

@@ -34,6 +34,7 @@ export interface ProblemsPanelOptions {
customLastChangeFormat?: boolean;
lastChangeFormat?: string;
resizedColumns?: RTResized;
allowDangerousHTML: boolean;
// Triggers severity and colors
triggerSeverity: TriggerSeverity[];
okEventColor: TriggerColor;
@@ -81,6 +82,7 @@ export const defaultPanelOptions: Partial<ProblemsPanelOptions> = {
customLastChangeFormat: false,
lastChangeFormat: '',
resizedColumns: [],
allowDangerousHTML: false,
// Triggers severity and colors
triggerSeverity: getDefaultSeverity(),
okEventColor: 'rgb(56, 189, 113)',