From c68e2b2d223c57836e04e18105255cf0e10ae75b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 4 Feb 2022 10:31:54 +0100 Subject: Fix plaintext markdown converter --- shared/core-utils/renderer/html.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'shared') diff --git a/shared/core-utils/renderer/html.ts b/shared/core-utils/renderer/html.ts index c9757be85..502308979 100644 --- a/shared/core-utils/renderer/html.ts +++ b/shared/core-utils/renderer/html.ts @@ -1,4 +1,4 @@ -export function getSanitizeOptions () { +export function getDefaultSanitizeOptions () { return { allowedTags: [ 'a', 'p', 'span', 'br', 'strong', 'em', 'ul', 'ol', 'li' ], allowedSchemes: [ 'http', 'https' ], @@ -23,8 +23,14 @@ export function getSanitizeOptions () { } } +export function getTextOnlySanitizeOptions () { + return { + allowedTags: [] as string[] + } +} + export function getCustomMarkupSanitizeOptions (additionalAllowedTags: string[] = []) { - const base = getSanitizeOptions() + const base = getDefaultSanitizeOptions() return { allowedTags: [ -- cgit v1.2.3