From f5acbaff71be2111ec92b2f1d5f651e4a889aacd Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Fri, 22 Nov 2024 09:39:44 +0100 Subject: [PATCH] Update `rss` dependency This update fixes the escaping of `]]>` in `CDATA`, which means we can remove our current workaround :) --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/worker/jobs/rss/sync_crates_feed.rs | 6 +----- src/worker/jobs/rss/sync_updates_feed.rs | 6 +----- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ec68775571a..17f117b7c94 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4102,9 +4102,9 @@ dependencies = [ [[package]] name = "rss" -version = "2.0.10" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "554a62b3dd5450fcbb0435b3db809f9dd3c6e9f5726172408f7ad3b57ed59057" +checksum = "531af70fce504d369cf42ac0a9645f5a62a8ea9265de71cfa25087e9f6080c7c" dependencies = [ "atom_syndication", "quick-xml 0.37.1", diff --git a/Cargo.toml b/Cargo.toml index 6b629ef1a28..276f62a6528 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -101,7 +101,7 @@ postgres-native-tls = "=0.5.0" prometheus = { version = "=0.13.4", default-features = false } rand = "=0.8.5" reqwest = { version = "=0.12.9", features = ["gzip", "json"] } -rss = { version = "=2.0.10", default-features = false, features = ["atom"] } +rss = { version = "=2.0.11", default-features = false, features = ["atom"] } secrecy = "=0.10.3" semver = { version = "=1.0.23", features = ["serde"] } sentry = { version = "=0.34.0", features = ["tracing", "tower", "tower-axum-matched-path", "tower-http"] } diff --git a/src/worker/jobs/rss/sync_crates_feed.rs b/src/worker/jobs/rss/sync_crates_feed.rs index f0f9b4d6633..133b3b692b5 100644 --- a/src/worker/jobs/rss/sync_crates_feed.rs +++ b/src/worker/jobs/rss/sync_crates_feed.rs @@ -125,10 +125,6 @@ impl NewCrate { permalink: true, }; - let description = self - .description - .map(|d| d.replace("]]>", "]]]]>")); - let name_extension = rss::extension::Extension { name: "crates:name".into(), value: Some(self.name), @@ -144,7 +140,7 @@ impl NewCrate { guid: Some(guid), title: Some(title), link: Some(link), - description, + description: self.description, pub_date: Some(pub_date), extensions, ..Default::default() diff --git a/src/worker/jobs/rss/sync_updates_feed.rs b/src/worker/jobs/rss/sync_updates_feed.rs index 95db5b90687..d4836f641c7 100644 --- a/src/worker/jobs/rss/sync_updates_feed.rs +++ b/src/worker/jobs/rss/sync_updates_feed.rs @@ -132,10 +132,6 @@ impl VersionUpdate { permalink: true, }; - let description = self - .description - .map(|d| d.replace("]]>", "]]]]>")); - let name_extension = rss::extension::Extension { name: "crates:name".into(), value: Some(self.name), @@ -160,7 +156,7 @@ impl VersionUpdate { guid: Some(guid), title: Some(title), link: Some(link), - description, + description: self.description, pub_date: Some(pub_date), extensions, ..Default::default()