replaceAll needs node 15

This commit is contained in:
lesion
2023-06-08 22:30:09 +02:00
parent 9ce9a1aad9
commit 76992414c5

View File

@@ -83,7 +83,7 @@ const exportController = {
function unixFormat (timestamp, format='EEEE d MMMM HH:mm') { function unixFormat (timestamp, format='EEEE d MMMM HH:mm') {
return DateTime.fromSeconds(timestamp, opt).toFormat(format) return DateTime.fromSeconds(timestamp, opt).toFormat(format)
} }
res.type('application/rss+xml; charset=UTF-8') res.type('application/rss+xml; charset=UTF-8')
res.render('feed/rss.pug', { events, settings, unixFormat, title, link }) res.render('feed/rss.pug', { events, settings, unixFormat, title, link })
@@ -109,7 +109,7 @@ const exportController = {
endInputType: 'utc', endInputType: 'utc',
title: `[${settings.title}] ${e.title}`, title: `[${settings.title}] ${e.title}`,
description: htmlToText(e.description), description: htmlToText(e.description),
htmlContent: e.description.replaceAll("\n","<br>"), htmlContent: e.description.replace(/\n/g,"<br>"),
location, location,
url: `${settings.baseurl}/event/${e.slug || e.id}`, url: `${settings.baseurl}/event/${e.slug || e.id}`,
status: 'CONFIRMED', status: 'CONFIRMED',