mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-22 00:07:52 +01:00
Fix:Export OPML not escaping characters #2487
This commit is contained in:
parent
eaf6bf29cc
commit
a426da534c
@ -1,4 +1,5 @@
|
|||||||
const xml = require('../../libs/xml')
|
const xml = require('../../libs/xml')
|
||||||
|
const escapeForXML = require('../../libs/xml/escapeForXML')
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate OPML file string for podcasts in a library
|
* Generate OPML file string for podcasts in a library
|
||||||
@ -12,18 +13,18 @@ module.exports.generate = (podcasts, indent = true) => {
|
|||||||
if (!podcast.feedURL) return
|
if (!podcast.feedURL) return
|
||||||
const feedAttributes = {
|
const feedAttributes = {
|
||||||
type: 'rss',
|
type: 'rss',
|
||||||
text: podcast.title,
|
text: escapeForXML(podcast.title),
|
||||||
title: podcast.title,
|
title: escapeForXML(podcast.title),
|
||||||
xmlUrl: podcast.feedURL
|
xmlUrl: escapeForXML(podcast.feedURL)
|
||||||
}
|
}
|
||||||
if (podcast.description) {
|
if (podcast.description) {
|
||||||
feedAttributes.description = podcast.description
|
feedAttributes.description = escapeForXML(podcast.description)
|
||||||
}
|
}
|
||||||
if (podcast.itunesPageUrl) {
|
if (podcast.itunesPageUrl) {
|
||||||
feedAttributes.htmlUrl = podcast.itunesPageUrl
|
feedAttributes.htmlUrl = escapeForXML(podcast.itunesPageUrl)
|
||||||
}
|
}
|
||||||
if (podcast.language) {
|
if (podcast.language) {
|
||||||
feedAttributes.language = podcast.language
|
feedAttributes.language = escapeForXML(podcast.language)
|
||||||
}
|
}
|
||||||
bodyItems.push({
|
bodyItems.push({
|
||||||
outline: {
|
outline: {
|
||||||
|
Loading…
Reference in New Issue
Block a user