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/controllers/feeds.ts | |
parent | 457c83486ed2037a8cf0e55b06b1ae9370ed4d93 (diff) | |
download | PeerTube-c68e2b2d223c57836e04e18105255cf0e10ae75b.tar.gz PeerTube-c68e2b2d223c57836e04e18105255cf0e10ae75b.tar.zst PeerTube-c68e2b2d223c57836e04e18105255cf0e10ae75b.zip |
Fix plaintext markdown converter
Diffstat (limited to 'server/controllers/feeds.ts')
-rw-r--r-- | server/controllers/feeds.ts | 6 |
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 @@ | |||
1 | import express from 'express' | 1 | import express from 'express' |
2 | import Feed from 'pfeed' | 2 | import Feed from 'pfeed' |
3 | import { mdToPlainText, toSafeHtml } from '@server/helpers/markdown' | 3 | import { mdToOneLinePlainText, toSafeHtml } from '@server/helpers/markdown' |
4 | import { getServerActor } from '@server/models/application/application' | 4 | import { getServerActor } from '@server/models/application/application' |
5 | import { getCategoryLabel } from '@server/models/video/formatter/video-format-utils' | 5 | import { getCategoryLabel } from '@server/models/video/formatter/video-format-utils' |
6 | import { VideoInclude } from '@shared/models' | 6 | import { 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 | { |