aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/client-html.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-02-04 10:31:54 +0100
committerChocobozzz <me@florianbigard.com>2022-02-04 10:38:32 +0100
commitc68e2b2d223c57836e04e18105255cf0e10ae75b (patch)
treea40348363efc90464ff44306435d45079b0b7fca /server/lib/client-html.ts
parent457c83486ed2037a8cf0e55b06b1ae9370ed4d93 (diff)
downloadPeerTube-c68e2b2d223c57836e04e18105255cf0e10ae75b.tar.gz
PeerTube-c68e2b2d223c57836e04e18105255cf0e10ae75b.tar.zst
PeerTube-c68e2b2d223c57836e04e18105255cf0e10ae75b.zip
Fix plaintext markdown converter
Diffstat (limited to 'server/lib/client-html.ts')
-rw-r--r--server/lib/client-html.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index 74788af52..19354ab70 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -12,7 +12,7 @@ import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
12import { VideoPlaylistPrivacy, VideoPrivacy } from '../../shared/models/videos' 12import { VideoPlaylistPrivacy, VideoPrivacy } from '../../shared/models/videos'
13import { isTestInstance } from '../helpers/core-utils' 13import { isTestInstance } from '../helpers/core-utils'
14import { logger } from '../helpers/logger' 14import { logger } from '../helpers/logger'
15import { mdToPlainText } from '../helpers/markdown' 15import { mdToOneLinePlainText } from '../helpers/markdown'
16import { CONFIG } from '../initializers/config' 16import { CONFIG } from '../initializers/config'
17import { 17import {
18 ACCEPT_HEADERS, 18 ACCEPT_HEADERS,
@@ -103,7 +103,7 @@ class ClientHtml {
103 res.status(HttpStatusCode.NOT_FOUND_404) 103 res.status(HttpStatusCode.NOT_FOUND_404)
104 return html 104 return html
105 } 105 }
106 const description = mdToPlainText(video.description) 106 const description = mdToOneLinePlainText(video.description)
107 107
108 let customHtml = ClientHtml.addTitleTag(html, video.name) 108 let customHtml = ClientHtml.addTitleTag(html, video.name)
109 customHtml = ClientHtml.addDescriptionTag(customHtml, description) 109 customHtml = ClientHtml.addDescriptionTag(customHtml, description)
@@ -164,7 +164,7 @@ class ClientHtml {
164 return html 164 return html
165 } 165 }
166 166
167 const description = mdToPlainText(videoPlaylist.description) 167 const description = mdToOneLinePlainText(videoPlaylist.description)
168 168
169 let customHtml = ClientHtml.addTitleTag(html, videoPlaylist.name) 169 let customHtml = ClientHtml.addTitleTag(html, videoPlaylist.name)
170 customHtml = ClientHtml.addDescriptionTag(customHtml, description) 170 customHtml = ClientHtml.addDescriptionTag(customHtml, description)
@@ -263,7 +263,7 @@ class ClientHtml {
263 return ClientHtml.getIndexHTML(req, res) 263 return ClientHtml.getIndexHTML(req, res)
264 } 264 }
265 265
266 const description = mdToPlainText(entity.description) 266 const description = mdToOneLinePlainText(entity.description)
267 267
268 let customHtml = ClientHtml.addTitleTag(html, entity.getDisplayName()) 268 let customHtml = ClientHtml.addTitleTag(html, entity.getDisplayName())
269 customHtml = ClientHtml.addDescriptionTag(customHtml, description) 269 customHtml = ClientHtml.addDescriptionTag(customHtml, description)