]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/renderer/html-renderer.service.ts
Remove avatarUrl from models
[github/Chocobozzz/PeerTube.git] / client / src / app / core / renderer / html-renderer.service.ts
index 1fe91b96bf83f1ed0c9d46477eee28a876d22da9..3176cf6a4c21795179a9234161712a168cb8a43a 100644 (file)
@@ -21,10 +21,12 @@ export class HtmlRendererService {
   }
 
   async toSafeHtml (text: string) {
-    await this.loadSanitizeHtml()
+    const [ html ] = await Promise.all([
+      // Convert possible markdown to html
+      this.linkifier.linkify(text),
 
-    // Convert possible markdown to html
-    const html = this.linkifier.linkify(text)
+      this.loadSanitizeHtml()
+    ])
 
     return this.sanitizeHtml(html, SANITIZE_OPTIONS)
   }