diff --git a/Cargo.lock b/Cargo.lock index 823472bd9f5..b9975ad72f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1087,7 +1087,6 @@ dependencies = [ "paste", "postgres-native-tls", "prometheus", - "quick-xml 0.37.0", "rand", "regex", "reqwest 0.12.9", diff --git a/Cargo.toml b/Cargo.toml index 82baad69bdc..979c5031bcb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,7 +95,6 @@ parking_lot = "=0.12.3" paste = "=1.0.15" postgres-native-tls = "=0.5.0" prometheus = { version = "=0.13.4", default-features = false } -quick-xml = "=0.37.0" rand = "=0.8.5" reqwest = { version = "=0.12.9", features = ["gzip", "json"] } rss = { version = "=2.0.10", default-features = false, features = ["atom"] } diff --git a/src/tests/worker/rss/snapshots/crates_io__tests__worker__rss__sync_crates_feed__sync_crates_feed-2.snap b/src/tests/worker/rss/snapshots/crates_io__tests__worker__rss__sync_crates_feed__sync_crates_feed-2.snap index f866838e1c6..301ccbfbb62 100644 --- a/src/tests/worker/rss/snapshots/crates_io__tests__worker__rss__sync_crates_feed__sync_crates_feed-2.snap +++ b/src/tests/worker/rss/snapshots/crates_io__tests__worker__rss__sync_crates_feed__sync_crates_feed-2.snap @@ -21,7 +21,7 @@ snapshot_kind: text New crate created: baz https://crates.io/crates/baz - + ]]]]>]]> https://crates.io/crates/baz Fri, 21 Jun 2024 17:01:33 +0000 baz diff --git a/src/tests/worker/rss/snapshots/crates_io__tests__worker__rss__sync_updates_feed__sync_updates_feed-2.snap b/src/tests/worker/rss/snapshots/crates_io__tests__worker__rss__sync_updates_feed__sync_updates_feed-2.snap index 6a962f4d544..9c934ded17c 100644 --- a/src/tests/worker/rss/snapshots/crates_io__tests__worker__rss__sync_updates_feed__sync_updates_feed-2.snap +++ b/src/tests/worker/rss/snapshots/crates_io__tests__worker__rss__sync_updates_feed__sync_updates_feed-2.snap @@ -1,6 +1,7 @@ --- source: src/tests/worker/rss/sync_updates_feed.rs expression: content +snapshot_kind: text --- @@ -29,7 +30,7 @@ expression: content New crate version published: bar v3.0.0-beta.1 https://crates.io/crates/bar/3.0.0-beta.1 - + ]]]]>]]> https://crates.io/crates/bar/3.0.0-beta.1 Fri, 21 Jun 2024 17:03:45 +0000 bar diff --git a/src/tests/worker/rss/sync_crates_feed.rs b/src/tests/worker/rss/sync_crates_feed.rs index baeff61554d..928175a631b 100644 --- a/src/tests/worker/rss/sync_crates_feed.rs +++ b/src/tests/worker/rss/sync_crates_feed.rs @@ -15,7 +15,7 @@ async fn test_sync_crates_feed() { let description = Some("something something foo"); create_crate(&mut conn, "foo", description, "2024-06-20T10:13:54Z").await; create_crate(&mut conn, "bar", None, "2024-06-20T12:45:12Z").await; - let description = Some("does it handle XML? "); + let description = Some("does it handle XML? ]]>"); create_crate(&mut conn, "baz", description, "2024-06-21T17:01:33Z").await; create_crate(&mut conn, "quux", None, "2024-06-21T17:03:45Z").await; diff --git a/src/tests/worker/rss/sync_updates_feed.rs b/src/tests/worker/rss/sync_updates_feed.rs index c653d33b7cb..87ae9a5e91e 100644 --- a/src/tests/worker/rss/sync_updates_feed.rs +++ b/src/tests/worker/rss/sync_updates_feed.rs @@ -12,7 +12,7 @@ async fn test_sync_updates_feed() { let (app, _) = TestApp::full().empty(); let mut conn = app.async_db_conn().await; - let d = Some("let's try & break this "); + let d = Some("let's try & break this ]]>"); create_version(&mut conn, "foo", "0.1.0", None, "2024-06-20T10:13:54Z").await; create_version(&mut conn, "foo", "0.1.1", None, "2024-06-20T12:45:12Z").await; diff --git a/src/worker/jobs/rss/sync_crates_feed.rs b/src/worker/jobs/rss/sync_crates_feed.rs index 12964cfa281..de28909f53a 100644 --- a/src/worker/jobs/rss/sync_crates_feed.rs +++ b/src/worker/jobs/rss/sync_crates_feed.rs @@ -127,7 +127,7 @@ impl NewCrate { let description = self .description - .map(|d| quick_xml::escape::escape(&d).to_string()); + .map(|d| d.replace("]]>", "]]]]>")); let name_extension = rss::extension::Extension { name: "crates:name".into(), diff --git a/src/worker/jobs/rss/sync_updates_feed.rs b/src/worker/jobs/rss/sync_updates_feed.rs index fbf63f2b5b2..3a817f732f8 100644 --- a/src/worker/jobs/rss/sync_updates_feed.rs +++ b/src/worker/jobs/rss/sync_updates_feed.rs @@ -134,7 +134,7 @@ impl VersionUpdate { let description = self .description - .map(|d| quick_xml::escape::escape(&d).to_string()); + .map(|d| d.replace("]]>", "]]]]>")); let name_extension = rss::extension::Extension { name: "crates:name".into(),