]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/core-utils/renderer/html.ts
Fix plaintext markdown converter
[github/Chocobozzz/PeerTube.git] / shared / core-utils / renderer / html.ts
index c9757be85e393a9edd870228a4993c4e7b42ce9b..50230897939498f7e243ca6321d47fe569f77ba0 100644 (file)
@@ -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: [