diff options
author | Chocobozzz <me@florianbigard.com> | 2022-02-04 10:31:54 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-02-04 10:38:32 +0100 |
commit | c68e2b2d223c57836e04e18105255cf0e10ae75b (patch) | |
tree | a40348363efc90464ff44306435d45079b0b7fca /server/lib | |
parent | 457c83486ed2037a8cf0e55b06b1ae9370ed4d93 (diff) | |
download | PeerTube-c68e2b2d223c57836e04e18105255cf0e10ae75b.tar.gz PeerTube-c68e2b2d223c57836e04e18105255cf0e10ae75b.tar.zst PeerTube-c68e2b2d223c57836e04e18105255cf0e10ae75b.zip |
Fix plaintext markdown converter
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/client-html.ts | 8 |
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' | |||
12 | import { VideoPlaylistPrivacy, VideoPrivacy } from '../../shared/models/videos' | 12 | import { VideoPlaylistPrivacy, VideoPrivacy } from '../../shared/models/videos' |
13 | import { isTestInstance } from '../helpers/core-utils' | 13 | import { isTestInstance } from '../helpers/core-utils' |
14 | import { logger } from '../helpers/logger' | 14 | import { logger } from '../helpers/logger' |
15 | import { mdToPlainText } from '../helpers/markdown' | 15 | import { mdToOneLinePlainText } from '../helpers/markdown' |
16 | import { CONFIG } from '../initializers/config' | 16 | import { CONFIG } from '../initializers/config' |
17 | import { | 17 | import { |
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) |