aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers/export
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-02-09 13:57:20 +0100
committerGravatar GitHub <noreply@github.com> 2023-02-09 13:57:20 +0100
commit05ae1b0d2684cea4eda664c5ea1a995cb9f0c4b9 (patch)
tree7f8bac745b5431139bec5197afc288ee694d28f5 /app/views/helpers/export
parentb9a62a6aaacf2763c45f503ed5602ba43bedfce0 (diff)
XML+XPath (#5076)
* XML+XPath #fix https://github.com/FreshRSS/FreshRSS/issues/5075 Implementation allowing to take an XML document as input using an XML parser (instead of an HTML parser for HTML+XPath) * Remove noise from another PR * Better MIME for XML * And add glob *.xml for cache cleaning * Minor syntax * Add glob json for clean cache
Diffstat (limited to 'app/views/helpers/export')
-rw-r--r--app/views/helpers/export/opml.phtml11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/views/helpers/export/opml.phtml b/app/views/helpers/export/opml.phtml
index eb6f7523b..64c83c960 100644
--- a/app/views/helpers/export/opml.phtml
+++ b/app/views/helpers/export/opml.phtml
@@ -18,8 +18,15 @@ function feedsToOutlines($feeds, $excludeMutedFeeds = false): array {
'description' => htmlspecialchars_decode($feed->description(), ENT_QUOTES),
];
- if ($feed->kind() === FreshRSS_Feed::KIND_HTML_XPATH) {
- $outline['type'] = FreshRSS_Export_Service::TYPE_HTML_XPATH;
+ if ($feed->kind() === FreshRSS_Feed::KIND_HTML_XPATH || $feed->kind() === FreshRSS_Feed::KIND_XML_XPATH) {
+ switch ($feed->kind()) {
+ case FreshRSS_Feed::KIND_HTML_XPATH:
+ $outline['type'] = FreshRSS_Export_Service::TYPE_HTML_XPATH;
+ break;
+ case FreshRSS_Feed::KIND_XML_XPATH:
+ $outline['type'] = FreshRSS_Export_Service::TYPE_XML_XPATH;
+ break;
+ }
/** @var array<string,string> */
$xPathSettings = $feed->attributes('xpath');
$outline['frss:xPathItem'] = $xPathSettings['item'] ?? null;