aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
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/controllers
parent457c83486ed2037a8cf0e55b06b1ae9370ed4d93 (diff)
downloadPeerTube-c68e2b2d223c57836e04e18105255cf0e10ae75b.tar.gz
PeerTube-c68e2b2d223c57836e04e18105255cf0e10ae75b.tar.zst
PeerTube-c68e2b2d223c57836e04e18105255cf0e10ae75b.zip
Fix plaintext markdown converter
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/feeds.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts
index 3c8680ca4..e6cdaf94b 100644
--- a/server/controllers/feeds.ts
+++ b/server/controllers/feeds.ts
@@ -1,6 +1,6 @@
1import express from 'express' 1import express from 'express'
2import Feed from 'pfeed' 2import Feed from 'pfeed'
3import { mdToPlainText, toSafeHtml } from '@server/helpers/markdown' 3import { mdToOneLinePlainText, toSafeHtml } from '@server/helpers/markdown'
4import { getServerActor } from '@server/models/application/application' 4import { getServerActor } from '@server/models/application/application'
5import { getCategoryLabel } from '@server/models/video/formatter/video-format-utils' 5import { getCategoryLabel } from '@server/models/video/formatter/video-format-utils'
6import { VideoInclude } from '@shared/models' 6import { VideoInclude } from '@shared/models'
@@ -236,7 +236,7 @@ function initFeed (parameters: {
236 236
237 return new Feed({ 237 return new Feed({
238 title: name, 238 title: name,
239 description: mdToPlainText(description), 239 description: mdToOneLinePlainText(description),
240 // updated: TODO: somehowGetLatestUpdate, // optional, default = today 240 // updated: TODO: somehowGetLatestUpdate, // optional, default = today
241 id: webserverUrl, 241 id: webserverUrl,
242 link: webserverUrl, 242 link: webserverUrl,
@@ -299,7 +299,7 @@ function addVideosToFeed (feed, videos: VideoModel[]) {
299 title: video.name, 299 title: video.name,
300 id: video.url, 300 id: video.url,
301 link: WEBSERVER.URL + video.getWatchStaticPath(), 301 link: WEBSERVER.URL + video.getWatchStaticPath(),
302 description: mdToPlainText(video.getTruncatedDescription()), 302 description: mdToOneLinePlainText(video.getTruncatedDescription()),
303 content: toSafeHtml(video.description), 303 content: toSafeHtml(video.description),
304 author: [ 304 author: [
305 { 305 {