From 0a7b7880daa782d34b5a7c137f466a9a767e7e4d Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Sun, 3 Mar 2019 19:49:53 -0500 Subject: [PATCH] opml: escape characters when exporting OPML is XML after all and parsers yell at us when we don't escape &s. --- podcasts-data/src/opml.rs | 3 +-- podcasts-data/tests/export_test.opml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/podcasts-data/src/opml.rs b/podcasts-data/src/opml.rs index f3b2e11..bfc609d 100644 --- a/podcasts-data/src/opml.rs +++ b/podcasts-data/src/opml.rs @@ -91,8 +91,7 @@ pub fn export_from_db>(path: P, export_title: &str) -> Result<(), /// Export from `Source`s and `Show`s into `F` in OPML format pub fn export_to_file(file: F, export_title: &str) -> Result<(), Error> { - let mut config = EmitterConfig::new().perform_indent(true); - config.perform_escaping = false; + let config = EmitterConfig::new().perform_indent(true); let mut writer = config.create_writer(file); diff --git a/podcasts-data/tests/export_test.opml b/podcasts-data/tests/export_test.opml index e2bd401..c4ae3e1 100644 --- a/podcasts-data/tests/export_test.opml +++ b/podcasts-data/tests/export_test.opml @@ -4,7 +4,7 @@ GNOME Podcasts Subscriptions - +