]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.ts
Fix HTML in account/channel description
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-playlist / video-playlist-miniature.component.ts
index c80ea2e6b0f2cb8fe9931b0b1b4b173a7f400204..225c4eb644d2fcf7790314b86b7a5797cfa74e9f 100644 (file)
@@ -1,6 +1,7 @@
 import { LinkType } from 'src/types/link.type'
 import { Component, Input, OnInit } from '@angular/core'
 import { VideoPlaylist } from './video-playlist.model'
+import { MarkdownService } from '@app/core'
 
 @Component({
   selector: 'my-video-playlist-miniature',
@@ -22,9 +23,17 @@ export class VideoPlaylistMiniatureComponent implements OnInit {
   routerLink: any
   playlistHref: string
   playlistTarget: string
+  playlistDescription: string
 
-  ngOnInit () {
+  constructor (
+    private markdownService: MarkdownService
+  ) {}
+
+  async ngOnInit () {
     this.buildPlaylistUrl()
+    if (this.displayDescription) {
+      this.playlistDescription = await this.markdownService.textMarkdownToHTML({ markdown: this.playlist.description })
+    }
   }
 
   buildPlaylistUrl () {