diff options
Diffstat (limited to 'shared/core-utils')
-rw-r--r-- | shared/core-utils/renderer/html.ts | 10 |
1 files changed, 8 insertions, 2 deletions
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 @@ | |||
1 | export function getSanitizeOptions () { | 1 | export function getDefaultSanitizeOptions () { |
2 | return { | 2 | return { |
3 | allowedTags: [ 'a', 'p', 'span', 'br', 'strong', 'em', 'ul', 'ol', 'li' ], | 3 | allowedTags: [ 'a', 'p', 'span', 'br', 'strong', 'em', 'ul', 'ol', 'li' ], |
4 | allowedSchemes: [ 'http', 'https' ], | 4 | allowedSchemes: [ 'http', 'https' ], |
@@ -23,8 +23,14 @@ export function getSanitizeOptions () { | |||
23 | } | 23 | } |
24 | } | 24 | } |
25 | 25 | ||
26 | export function getTextOnlySanitizeOptions () { | ||
27 | return { | ||
28 | allowedTags: [] as string[] | ||
29 | } | ||
30 | } | ||
31 | |||
26 | export function getCustomMarkupSanitizeOptions (additionalAllowedTags: string[] = []) { | 32 | export function getCustomMarkupSanitizeOptions (additionalAllowedTags: string[] = []) { |
27 | const base = getSanitizeOptions() | 33 | const base = getDefaultSanitizeOptions() |
28 | 34 | ||
29 | return { | 35 | return { |
30 | allowedTags: [ | 36 | allowedTags: [ |