Skip to content

Commit

Permalink
Fix:Export OPML not escaping characters advplyr#2487
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Jan 5, 2024
1 parent eaf6bf2 commit a426da5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions server/utils/generators/opmlGenerator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const xml = require('../../libs/xml')
const escapeForXML = require('../../libs/xml/escapeForXML')

/**
* Generate OPML file string for podcasts in a library
Expand All @@ -12,18 +13,18 @@ module.exports.generate = (podcasts, indent = true) => {
if (!podcast.feedURL) return
const feedAttributes = {
type: 'rss',
text: podcast.title,
title: podcast.title,
xmlUrl: podcast.feedURL
text: escapeForXML(podcast.title),
title: escapeForXML(podcast.title),
xmlUrl: escapeForXML(podcast.feedURL)
}
if (podcast.description) {
feedAttributes.description = podcast.description
feedAttributes.description = escapeForXML(podcast.description)
}
if (podcast.itunesPageUrl) {
feedAttributes.htmlUrl = podcast.itunesPageUrl
feedAttributes.htmlUrl = escapeForXML(podcast.itunesPageUrl)
}
if (podcast.language) {
feedAttributes.language = podcast.language
feedAttributes.language = escapeForXML(podcast.language)
}
bodyItems.push({
outline: {
Expand Down

0 comments on commit a426da5

Please sign in to comment.